omissis / go-jsonschema

A tool to generate Go data types from JSON Schema definitions.
MIT License
582 stars 93 forks source link

feat: introduce minLength and maxLength validation for strings #111

Closed AlbertoBarba closed 1 year ago

AlbertoBarba commented 1 year ago

Introduce string validations: 6.3.1 maxlength 6.3.2 minlength

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 96.15% and project coverage change: +0.52% :tada:

Comparison is base (1ca1837) 78.14% compared to head (aa887ab) 78.67%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #111 +/- ## ========================================== + Coverage 78.14% 78.67% +0.52% ========================================== Files 10 10 Lines 1446 1496 +50 ========================================== + Hits 1130 1177 +47 - Misses 244 246 +2 - Partials 72 73 +1 ``` | [Files Changed](https://app.codecov.io/gh/omissis/go-jsonschema/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Claudio+Beatrice) | Coverage Δ | | |---|---|---| | [pkg/generator/validator.go](https://app.codecov.io/gh/omissis/go-jsonschema/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Claudio+Beatrice#diff-cGtnL2dlbmVyYXRvci92YWxpZGF0b3IuZ28=) | `94.33% <90.90%> (-0.90%)` | :arrow_down: | | [pkg/generator/generate.go](https://app.codecov.io/gh/omissis/go-jsonschema/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Claudio+Beatrice#diff-cGtnL2dlbmVyYXRvci9nZW5lcmF0ZS5nbw==) | `76.18% <100.00%> (+0.48%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.