Extending the scope of the suite to schemas which are invalid under the specification text but not under its metaschema #581
ssilverman
started this conversation in
General
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are a number of constraints that the specification places on schemas which make them (the schemas) valid or invalid. Many or most of these constraints are specified in the draft's metaschema. As a concrete example, schemas must be objects or booleans, and the metaschema includes a
type
validator to ensure as such. There are however a number of constraints the draft specifications place on schemas which are not represented in a metaschema. They are directed (presumably at schema authors) as things they MUST NOT do, but no validatable entity exists which implements these constraints.Because no such entity exists, it's not currently possible to test these constraints under the current structure of the suite.
Known examples
$schema
more to be added
If the decision is made that the suite should test this behavior (e.g., because implementers should implement validation of this behavior), then a structure change may be necessary to the suite, in which case one needs to be designed in a way to reduce impact to users of the test suite.
There are a few ways to do this. Here are two:
Both cases basically tell the test runner, "apply additional schema rules to the data instances too".
Beta Was this translation helpful? Give feedback.
All reactions