Closed karenetheridge closed 2 years ago
Reporting of unrecognized keywords can be done once we have a pre-validation traversal step (see #33), which guarantees that all subschemas are visited (just once, when the schema is introduced to the implementation) even if the data instance doesn't necessitate it.
Otherwise, the user can always evaluate the schema against a stricter metaschema which has unevaluatedProperties: false
added to the base schema.
when we start (optionally) checking for unrecognized keywords, the current hooks for 'definitions' and 'dependencies' should be removed, as they can be encompassed by the generic checks. When strict mode is not enabled, their use will be ignored as is the case for all other unrecognized keywords.
strict mode now exists as an option (as of 0.542 2022-01-23 08:17:08Z).
stricter checks on typing (e.g. reject scalars that are both PV and NV or IV)<- this is done by default with no option to turn it offkeyword evaluation first checks for malformed schema syntax before using it (this mostly will just create nicer error messages - without this we will leak exception messages into our error strings)no - we should always do thisvalidate the schema against its specified meta-$schema first before using it (save a "validated?" flag on the document so it isn't done multiple times) <-- this is basically done anyway via the assertions done in each keyword implementation
fail evaluation if there are any unrecognized keywords (perhaps indicating a misspelling, or a keyword in the wrong place)