-
-
Notifications
You must be signed in to change notification settings - Fork 313
Split "unevaluated*" into separate vocab for separate support indications #853
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
Comments
Hum. Initially I was like 😕 but now I'm like 👌. I think getting implementers prepared to support different standard setups is a good idea. Splitting the unevaluated keywords and making them an optional vocabualry (declared with false value) would send the right signals to the lay user who maybe looks at the meta-schema but is unlikely to delve into the RFC documents (because we have to remember normal people don't do that very often... and it's not always easy). I'm kinda for this. In terms of "new draft release", I think it shouldn't be too hard to sell OAS on this, especially as it includes a number of fixes for them. |
@Relequestual I think we would, by default, want to require them to be supported- they're in high demand and we want to encourage them to be adopted. But we can easily offer (or encourage people to create) a meta-schema that does not require them to be supported, which would be preferable for some scenarios. |
TL;DR: Options are
I favor 2.i: split them into their own vocabulary, but leave that vocabulary required by default. |
I agree with the 2.i approach. That's the most ideal as it gives everyone what they want in some way, and makes it easier, but not advised, to not support They are the only keywords which currently depends on annotation collection, right? |
I don't know that I have an opinion here yet, but is it the same with |
@Julian sort-of.
There's some wording that says something like "applications are allowed to use Which basically means that none of the This is covered in section 8.2, and if that's not clear then wording improvements would be welcome. |
Thanks! Most of that makes sense I think to me (despite not being up to speed fully yet). Will have a look there. |
Giving this the green light for a PR. |
While responding at ajv-validator/ajv#1082 (comment) I was reminded that we technically allow validators to make an independent decision about supporting
unevaluatedProperties
andunevaluatedItems
due to their dependence on annotation collection, which is not required for basic spec conformance.We did that before the
$vocabulary
process had been developed. Which means that whether or not these keywords are considered errors is totally outside of that process, which is otherwise how we give schema authors control over ensuring support for the features on which they depend.We could split those keywords out of the "applicator" vocabulary (perhaps in to an "annotated-applicator" vocabulary, or just "unevaluated", or something, the name isn't that important).
Then we could provide (or just tell people they can write, like we do with the different "format" vocabulary options) a meta-schema that is just like the standard one, but with the "unevaluated" (or whatever) vocabulary declared with
false
, or omitted entirely.This would require meta-schema updates, but given that 2019-09 has barely been implemented at all and still does not even have a full test suite, rolling everything forward to a 2020-03 or 2020-04 that is aligned with OpenAPI 3.1 would be pretty reasonable. I will file a separate issue for tracking the question of whether the draft-08-patch1 release should be one with a new meta-schema or not.
The text was updated successfully, but these errors were encountered: