herbsjs / gotu

Entities - Create your Entity and enjoy an elegant validation and serialization
Other
11 stars 19 forks source link

feat(field): add id field type #52

Closed jhomarolo closed 2 years ago

jhomarolo commented 2 years ago

Adding ID field option on metadata.

Took the liberty to add a type validation for ID fields (only Number and String), if the wrong type is sent, gotu will ignore the isID option. Hope it's consensus among all that we need something like that, but I did not implemented nothing fancy for now.

finishing pr #48

Fixes #46

Proposed Changes

  1. Adding ID field option on metadata.

Readiness Checklist

Author/Contributor

Reviewing Maintainer

codecov[bot] commented 2 years ago

Codecov Report

Merging #52 (d48db19) into master (91c62d1) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #52   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         4    +1     
  Lines          103       108    +5     
=========================================
+ Hits           103       108    +5     
Impacted Files Coverage Δ
src/baseEntity.js 100.00% <100.00%> (ø)
src/customTypes/id.js 100.00% <100.00%> (ø)
src/field.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 91c62d1...d48db19. Read the comment docs.

dalssoft commented 2 years ago

I think this PR is ready to merge. However, it should be merged only if the documentation on the web site is ready to merge as well.

jhomarolo commented 2 years ago

@dalssoft ok, I'll do it

jhomarolo commented 2 years ago

:tada: This PR is included in version 1.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: