JSON Schema (draft 2020-12) for content validation: district, location, npc-profile, dialogue-pool, monologue-pool, triangle, routine, and fact-catalog. NPC schema uses if/then conditional for FRIEND pattern validation. Implements ticket #386. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1.2 KiB
JSON
50 lines
1.2 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "district.schema.json",
|
|
"title": "District Metadata",
|
|
"description": "District definition file — one per district directory (D-036).",
|
|
"type": "object",
|
|
"required": ["canonical_id", "display_name", "system", "station", "district", "description", "locations", "npc_count"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"canonical_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z]+\\.[a-z]+\\.[a-z-]+$",
|
|
"description": "Canonical ID in format {system}.{station}.{district}"
|
|
},
|
|
"display_name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"system": {
|
|
"type": "string",
|
|
"pattern": "^[a-z]+$"
|
|
},
|
|
"station": {
|
|
"type": "string",
|
|
"pattern": "^[a-z]+$"
|
|
},
|
|
"district": {
|
|
"type": "string",
|
|
"pattern": "^[a-z-]+$"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"locations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]*$"
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
},
|
|
"npc_count": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
}
|