Add enum parameter to number and integer schema methods#29
Conversation
|
I'm not sure about this PR now. I cant find where enum is defined in the spec, but the bedrock API didnt seem to like having enum on number |
|
Hi! Is there any update on this? I started a thread about the same thing on the #30 |
|
https://json-schema.org/draft/2020-12/json-schema-validation#section-6.1.2 The spec says the value must be an array, and an instance is valid if it equals one of the array elements. Those elements can be any JSON type, so integer and number enums are valid JSON Schema. This PR looks complete for the runtime DSL behavior. What I’d still like before merge:
No further implementation changes look necessary. |
crmne
left a comment
There was a problem hiding this comment.
As mentioned in the previous comment
crmne
left a comment
There was a problem hiding this comment.
All requested changes are addressed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29 +/- ##
=======================================
Coverage 94.79% 94.79%
=======================================
Files 12 12
Lines 365 365
Branches 73 73
=======================================
Hits 346 346
Misses 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds enum support for numeric schema builders, including integer and number examples/spec coverage.\n\nCloses #30