You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "$vocabulary" keyword is used in meta-schemas to identify the vocabularies available for use in schemas described by that meta-schema. It is also used to indicate whether each vocabulary is required or optional, in the sense that an implementation MUST understand the required vocabularies in order to successfully process the schema. Together, this information forms a dialect. Any vocabulary that is understood by the implementation MUST be processed in a manner consistent with the semantic definitions contained within the vocabulary.
The intent of "identify the vocabularies available for use" is that schemas not identified as available for use are not available for use. We have do have a test for this scenario.
Supporting points for this view include:
There wouldn't be a need for optional vocabularies if omitting a vocabulary still allowed you to use it
There wouldn't be a need for the introduction of §8 to discuss handling of both omitting the core vocabulary and including it as optional, with the recommendation to raise an error in such cases, if omitting it had no effect.
An exhaustive discussion of further historical details, complete with citations from old issue and PR discussions, can be found in json-schema-org/JSON-Schema-Test-Suite#574
We just need to add normative language around the omission aspect. A related clarification (also discussed in the linked test suite issue) is that non-vocabulary keywords of the same name as vocabulary keywords are not considered the same keyword, any more than identically named keywords in different vocabularies are. They can be distinguished by whether inclusion in or omission from $vocabulary has an effect on them.
The text was updated successfully, but these errors were encountered:
Per the §8.1.2 of the core spec:
The intent of "identify the vocabularies available for use" is that schemas not identified as available for use are not available for use. We have do have a test for this scenario.
Supporting points for this view include:
An exhaustive discussion of further historical details, complete with citations from old issue and PR discussions, can be found in json-schema-org/JSON-Schema-Test-Suite#574
We just need to add normative language around the omission aspect. A related clarification (also discussed in the linked test suite issue) is that non-vocabulary keywords of the same name as vocabulary keywords are not considered the same keyword, any more than identically named keywords in different vocabularies are. They can be distinguished by whether inclusion in or omission from
$vocabulary
has an effect on them.The text was updated successfully, but these errors were encountered: