Currently, the pre-evaluation traversal of a schema (to identify embedded identifiers in $id and $anchor keywords, and in the future to identify alternative $schema values) is very naive and just walks the data structure, extracting all fields it finds. This is not good enough, as keywords embedded in non-schema nodes (e.g. under enum, const, default and examples keywords) will generate false positives, which at best creates bogus entries in the resource index and at worst can result in a non-schema conflicting with a real schema elsewhere (which will raise an exception) or even in the future cause an invalid metaschema or vocabulary to be applied to the schema.
We also need a more sophisticated traverser for identifying and extracting embedded $refs for bundling referenced definitions together with a schema (see #16)
See my conch notes circa mid-August for some hints as to how to implement this.
Currently, the pre-evaluation traversal of a schema (to identify embedded identifiers in
$id
and$anchor
keywords, and in the future to identify alternative$schema
values) is very naive and just walks the data structure, extracting all fields it finds. This is not good enough, as keywords embedded in non-schema nodes (e.g. underenum
,const
,default
andexamples
keywords) will generate false positives, which at best creates bogus entries in the resource index and at worst can result in a non-schema conflicting with a real schema elsewhere (which will raise an exception) or even in the future cause an invalid metaschema or vocabulary to be applied to the schema.We also need a more sophisticated traverser for identifying and extracting embedded
$ref
s for bundling referenced definitions together with a schema (see #16)See my conch notes circa mid-August for some hints as to how to implement this.