-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
additionalItems should only apply for tuples #1138
Comments
The simple array type above makes sense. But what about those tuples... Say we have this:
Would we expect to generate:
or rather a tuple and an array type in union 🤔
I am leaning towards the last option because the following input is valid:
Same with:
Same with:
And in most languages its either a tuple or array, it cant be partly tuple and partly array. So even though you lose the tuple structure for the array type |
Continued with tuple discussion here: #1139 |
I've had issues with differences between draft 7 and draft 2020-12: https://ajv.js.org/json-schema.html#draft-2020-12 |
Gonna be solved in |
Describe the bug
Currently, additionalItems are applied even when the items are not a tuple.
https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.2
This means that this:
generates this union type:
When it should only be:
The text was updated successfully, but these errors were encountered: