Establish shared domain schemas and offline validation

This commit is contained in:
2026-11-28 19:44:30 +00:00
parent e5e469f0b8
commit 9cc9f6f777
54 changed files with 2073 additions and 1 deletions

17
docs/origins/README.md Normal file
View File

@@ -0,0 +1,17 @@
# Incorporated schema origin
The [original glossary schema](reference-catalog-glossary-v1.schema.json) is an
unmodified snapshot of `schemas/glossary-v1.schema.json` from the local
`narratio-reference-catalog` repository at commit
`a1a87edafd59a1de545a1c0b4efe5feeb80348e0`.
That repository's README dedicates its original vocabulary, schema, examples,
and documentation to CC0 1.0. Its LICENSE contains the CC0 1.0 text also supplied
in this distribution's [LICENSE](../../LICENSE). The selected revision is not
publicly available at the forge during this adoption. This snapshot makes the
incorporated source independently inspectable in the distribution.
The active [shared glossary schema](../../schemas/glossary.schema.json) adapts
that source with an envelope, changed defined fields, structural extensions,
and provenance. The snapshot records origin; it is not a supported contract
or an additional schema that consumers need to register.

View File

@@ -0,0 +1,85 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://forge.maximumdirect.net/eric/narratio-reference-catalog/schemas/glossary-v1.schema.json",
"title": "Glossary named collections v1",
"$ref": "#/$defs/document",
"$defs": {
"entry": {
"type": "object",
"required": [
"id",
"name",
"category"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1
},
"category": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"aliases": {
"type": ["array", "null"],
"items": {
"type": "string",
"minLength": 1
}
},
"plural": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"additionalProperties": true
},
"partialCollection": {
"type": "object",
"properties": {
"instruction": {
"type": "string"
},
"entries": {
"type": "array",
"items": {
"$ref": "#/$defs/entry"
}
}
},
"additionalProperties": false
},
"collection": {
"allOf": [
{
"$ref": "#/$defs/partialCollection"
},
{
"required": [
"entries"
]
}
]
},
"document": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/collection"
}
}
}
}