Files
repo-template-OPEN/schemas/content-index.schema.json
T

133 lines
2.8 KiB
JSON
Raw Normal View History

2026-07-24 16:17:28 -06:00
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://projects.eddiesoehnel.com/adminprojects/repo-template/schemas/content-index.schema.json",
"title": "Repository Content Index",
"description": "Compact machine-readable catalog of individual documents in a content-heavy repository.",
"type": "object",
"required": [
"schema_version",
"collection_id",
"title",
"description",
"updated_at",
"items"
],
"properties": {
"$schema": {
"type": "string"
},
"schema_version": {
"type": "string",
"pattern": "^\\d+\\.\\d+$"
},
"collection_id": {
"type": "string",
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"title": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string",
"minLength": 1
},
"updated_at": {
"type": "string",
"format": "date"
},
"items": {
"type": "array",
"items": {
"$ref": "#/$defs/contentItem"
}
}
},
"additionalProperties": false,
"$defs": {
"stringArray": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"contentItem": {
"type": "object",
"required": [
"content_id",
"title",
"description",
"content_type",
"path",
"status"
],
"properties": {
"content_id": {
"type": "string",
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"title": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string",
"minLength": 1
},
"content_type": {
"type": "string",
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"path": {
"type": "string",
"minLength": 1
},
"canonical_url": {
"type": [
"string",
"null"
]
},
"published_at": {
"type": [
"string",
"null"
],
"format": "date"
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date"
},
"status": {
"type": "string",
"enum": [
"draft",
"published",
"deprecated",
"archived",
"superseded"
]
},
"author": {
"type": [
"string",
"null"
]
},
"topics": {
"$ref": "#/$defs/stringArray"
},
"related_content_ids": {
"$ref": "#/$defs/stringArray"
}
},
"additionalProperties": false
}
}
}