-
-
Notifications
You must be signed in to change notification settings - Fork 360
Description
In a multi-vocabulary system (#561), should it be possible to explicitly reference the core vocabulary? Should it be required to do so?
Keep in mind that vocabularies are listed in meta-schemas, not in individual schemas, so the number of times your average schema author will need to do this is quite small.
The main use case for listing the core vocabulary is identifying which version of core is in use (e.g. draft-08), since it is not necessary for all vocabulary draft numberings to match. In particular, extension vocabularies and meta-schema will likely not indicate a draft number, so anything that relies on matching draft-NN in the URI is not feasible.
Here is what a core vocabulary meta-schema would probably look like (note that per #513, the applicators are their own vocabulary even if the live in the core specification):
{
"$id": "http://json-schema.org/draft-08/vocabularies/core",
"$schema": "http://json-schema.org/draft-08/schema#",
"type": ["object", "boolean"],
"properties": {
"$id": {"type": "string", "format": "uri-reference"},
"$schema": {"type": "string", "format": "uri"},
"$recurse": {"type": "boolean", "const": true},
"$ref": {"type": "string", "format": "uri-reference"},
"$defs": {"type": "object", "additionalProperties": {"$recurse": true}},
"$comment": {"type": "string"}
}
}My inclination would be to publish such a vocabulary schema, and use it in the meta-schemas. This is the most consistent and clear approach, and allows the most flexibility for extensions.
Metadata
Metadata
Assignees
Type
Projects
Status