-
-
Notifications
You must be signed in to change notification settings - Fork 357
Add "unevaluatedProperties" and "unevaluatedItems" #656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@handrews
handrews
force-pushed
the
uneval
branch
from
September 24, 2018 14:58
3e0ad38 to
a71aa68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've forgotten some of the basics of this.
I agree on the proposal, but I'm unsure of the language.
Relequestual
Relequestual
approved these changes
Nov 8, 2018
This was referenced Nov 12, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Address #556 and #557.
The only slightly unusual thing here is that while
additionalItemsonly takes effect whenitemsis present, due to the more dynamic nature ofunevaluatedItems, I decided that it could take place whetheritemsis present anywhere or not.I believe the restriction on
additionalItemsis to avoid an ambiguity where you can use eitheritemsoradditionalItemsto perform the same assertion. RequiringadditionalItemsto be ignored in the absence ofitemsmakes the single-schema use ofitemsunambiguously the only way to validated every item in an array.For
unevaluatedItems, it seems more correct for it to apply even when no array elements have had a schema evaluated against them, rather than requiring that somewhere in the depths of subschemas there must have been an array-formitems. I could be persuaded otherwise, but with this approach, the single schema form ofitemsbecomes a way to unconditionally apply a schema to the enter array, whileunevaluatedItemshas an inherently conditional behavior- it applies to all only if none were already evaluated.unevaluatedPropertieshas no such ambiguities, and I believe is specified exactly as it has been extensively discussed.