Files
schemas/glossary/v0.1.0/schema.json

52 lines
1.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.maximumdirect.net/glossary/v0.1.0/schema.json",
"title": "MAXIMUMDIRECT Glossary v1",
"type": "object",
"required": ["schema_version", "collections"],
"properties": {
"schema_version": {"const": "maximumdirect.glossary.v1"},
"collections": {
"type": "object",
"propertyNames": {"minLength": 1},
"additionalProperties": {"$ref": "#/$defs/collection"}
}
},
"$defs": {
"text": {"type": "string", "minLength": 1},
"aliases": {"type": ["array", "null"], "items": {"$ref": "#/$defs/text"}},
"entry": {
"type": "object",
"required": ["id", "name", "category"],
"properties": {
"id": {"$ref": "#/$defs/text"},
"name": {"$ref": "#/$defs/text"},
"category": {"$ref": "#/$defs/text"},
"description": {"type": "string"},
"aliases": {"$ref": "#/$defs/aliases"},
"plural": {"type": ["string", "null"], "minLength": 1}
}
},
"provenance": {
"type": "object",
"properties": {
"id": {"$ref": "#/$defs/text"},
"title": {"$ref": "#/$defs/text"},
"version": {"type": "string"},
"url": {"type": "string"},
"license": {"type": "string"}
}
},
"partialCollection": {
"type": "object",
"properties": {
"entries": {"type": "array", "items": {"$ref": "#/$defs/entry"}},
"provenance": {"$ref": "#/$defs/provenance"}
}
},
"collection": {
"allOf": [{"$ref": "#/$defs/partialCollection"}, {"required": ["entries"]}]
}
}
}