Files
card-layouts/schemas/reference-registry.schema.json

75 lines
1.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "reference-registry.schema.json",
"title": "Rejestr współdzielonych referencji dydaktycznych",
"type": "object",
"required": ["schema", "uuid", "name", "title", "root_path", "base_url", "entries"],
"properties": {
"$schema": {
"type": "string"
},
"schema": {
"const": "esc-reference-registry.v1"
},
"uuid": {
"$ref": "#/$defs/uuid"
},
"name": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]*$"
},
"title": {
"type": "string",
"minLength": 1
},
"root_path": {
"type": "string",
"minLength": 1
},
"base_url": {
"type": "string",
"format": "uri",
"minLength": 1
},
"entries": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/entry"
}
}
},
"additionalProperties": false,
"$defs": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"entry": {
"type": "object",
"required": ["uuid", "kind", "title", "path"],
"properties": {
"uuid": {
"$ref": "#/$defs/uuid"
},
"kind": {
"enum": ["strategy", "card", "content", "formula"]
},
"code": {
"type": "string",
"minLength": 1
},
"title": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
}
}