karenetheridge / JSON-Schema-Modern

Validate data against a schema using a JSON Schema
https://metacpan.org/release/JSON-Schema-Modern/
Other
10 stars 1 forks source link

add method to result object for unknown keywords #54

Closed karenetheridge closed 2 years ago

karenetheridge commented 2 years ago

With collect_anntotations => 1 and annotate_unknown_keywords => 1, unknown keywords will be collected as annotations. We can have a annotations filter method on the result object to return all of these and their locations, which is helpful for diagnosing schema authoring errors.

We would have to store the vocabularies in the result object (or perhaps on the annotation node itself, since the metaschema can change midway), in order to know what the known keywords are.

karenetheridge commented 2 years ago

or just add an 'unknown' boolean attribute to the annotation object.

karenetheridge commented 2 years ago

This is done in version 0.526.