Bundle shared domain contracts and validation
This commit is contained in:
51
internal/domaininput/resources/glossary/v0.2.0/schema.json
Normal file
51
internal/domaininput/resources/glossary/v0.2.0/schema.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://schemas.maximumdirect.net/glossary/v0.2.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"]}]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user