-
-
Notifications
You must be signed in to change notification settings - Fork 219
Add tests for contentSchema #418
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
Conversation
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 tried them out. They look fine to me.
To clarify, we do NOT expect that these should pass with a default-configured evaluator, correct? It might be helpful to put a comment in the tests explaining this -- I can imagine some implementor might assume that every test is supposed to pass, and write code accordingly, without looking closely at the spec. Perhaps the same tests can also be added to the main directory, but with every schema evaluating as valid. The spec says:
and
|
(edit: this file already existed in the test suite, so my concerns are not new with this PR.) |
I think that's my understanding too yeah. I assume the intention is similar to But yeah certainly clarifications welcome there. |
If, according to https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.8.1, i.e. does this sentence:
apply to all validators, those that don't have the "content" vocabulary enabled, those that have that vocabulary enabled, or those that have the vocabulary AND are configured to treat these keywords as assertions? How is this similar or not similar to "format"? |
So looking at the spec myself, yeah I guess it doesn't say as it does for format that implementations may treat these as assertions, so it indeed looks like these aren't correct (and that someone cannot implement validation on them and call it draft2019-09). So yeah please revert or change to all true, if the two of you can agree? Certainly an implementation can choose to implement validation for these, same as they can implement whatever additional behavior they choose, but yeah the official draft doesn't include doing so. |
FWIW Henry says "please don't" - see #specification on slack |
When the tests are all |
@karenetheridge #448 (I’m about to move those to non-optional.) |
These were entirely missing.
draft2019-09 only, in optional.
Top to bottom: