Skip to content

Spec disagrees with meta-schema for "items" minimum size #953

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

Closed
ssilverman opened this issue Jun 22, 2020 · 3 comments
Closed

Spec disagrees with meta-schema for "items" minimum size #953

ssilverman opened this issue Jun 22, 2020 · 3 comments

Comments

@ssilverman
Copy link
Member

ssilverman commented Jun 22, 2020

The meta-schema limits "schemaArray" to have a minimum of 1 element. This applies to "items", "allOf", "anyOf", and "oneOf". However, the specification does not limit to a 1 element minimum. Either the spec should change or the meta-schemas should change.

Update: I'm wrong about "allOf", "anyOf", and "oneOf". The spec DOES say these must be non-empty. Only "items" doesn't appear to specify a minimum size in the spec.

@karenetheridge
Copy link
Member

I lean towards the schema being more correct here, as it is not useful to have a zero-element schema array. I agree that the spec should explicitly state all restrictions that the schema chooses to enforce. (The reverse is not always possible, e.g. that certain URIs must be normalized.)

@ssilverman
Copy link
Member Author

ssilverman commented Jun 22, 2020

I'm so wrong about "allOf", "anyOf", and "oneOf". The spec DOES say those arrays must be non-empty. (What was I thinking?) Only "items" seems to disagree.

@ssilverman ssilverman changed the title Spec disagrees with meta-schema for arrays-of-schema keywords Spec disagrees with meta-schema for "items" minimum size Jun 22, 2020
@handrews
Copy link
Contributor

Closing in favor of #975 (decision of which to close was arbitrary)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants