Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
handrews merged 2 commits into json-schema-org:master from handrews:uneval
Nov 8, 2018

Conversation

@handrews
Copy link
Contributor

@handrews handrews commented Sep 24, 2018

Address #556 and #557.

The only slightly unusual thing here is that while additionalItems only takes effect when items is present, due to the more dynamic nature of unevaluatedItems, I decided that it could take place whether items is present anywhere or not.

I believe the restriction on additionalItems is to avoid an ambiguity where you can use either items or additionalItems to perform the same assertion. Requiring additionalItems to be ignored in the absence of items makes the single-schema use of items unambiguously 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-form items. I could be persuaded otherwise, but with this approach, the single schema form of items becomes a way to unconditionally apply a schema to the enter array, while unevaluatedItems has an inherently conditional behavior- it applies to all only if none were already evaluated.

unevaluatedProperties has no such ambiguities, and I believe is specified exactly as it has been extensively discussed.

Chudesnov, bquinn, and jure reacted with hooray emoji
Copy link
Member

@Relequestual Relequestual left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Relequestual Relequestual Relequestual approved these changes

Assignees

No one assigned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /