Closed superstas closed 1 month ago
[!CAUTION]
Review failed
The pull request is closed.
The updates enhance schema validation by refining how minimum and maximum constraints are managed through struct field tags. The SchemaFromField
function now ensures these tags exist before value assignment, which increases robustness. Additionally, a new type, TypedIntegerWithCustomLimits
, is introduced to enforce specific boundaries on integer values, complemented by expanded test coverage to validate these features, significantly improving the overall schema handling capabilities.
Files | Change Summary |
---|---|
schema.go |
Enhanced validation in SchemaFromField to check for "minimum" and "maximum" tags before value assignment, improving robustness. |
schema_test.go |
Added TypedIntegerWithCustomLimits type with a TransformSchema method to enforce integer limits, plus expanded test coverage for schema transformations. |
In the meadow where schemas grow,
A rabbit hops, with joy in tow.
Tags of limits, snug and bright,
Make our structures feel just right!
With every test, we bound and play,
Validations bloom, hip-hip-hooray! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.83%. Comparing base (
9bf5661
) to head (b5505f9
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It's similar to #512, but about
minimum
andmaximum
Summary by CodeRabbit
New Features
TypedIntegerWithCustomLimits
, allowing for specific integer limits in schemas.Bug Fixes
Tests