Files
brain/docs/registry/schema.json
T

55 lines
2.3 KiB
JSON
Raw Normal View History

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://liderra.local/registry-schema.json",
"title": "Liderra Node Registry",
"type": "object",
"required": ["version", "nodes"],
"properties": {
"version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
"nodes": {
"type": "array",
"items": { "$ref": "#/definitions/node" }
}
},
"definitions": {
"node": {
"type": "object",
"required": ["id", "name", "slug", "category", "status", "triggers"],
"properties": {
"id": { "type": "string", "pattern": "^#\\d+[a-z]?$" },
"name": { "type": "string", "minLength": 3 },
"slug": { "type": "string", "pattern": "^[a-z0-9-]+(:[a-z0-9-]+)*$" },
"category": { "enum": ["phase-0", "phase-1", "phase-2", "phase-3", "off-phase"] },
"subcategory": { "type": ["string", "null"] },
"status": { "enum": ["active", "dormant", "deferred", "historic"] },
"dormancy_reason": { "type": ["string", "null"] },
"triggers": {
"type": "array",
"items": {
"oneOf": [
{ "type": "object", "required": ["keyword"], "properties": { "keyword": { "type": "string" }, "weight": { "type": "number", "minimum": 0, "maximum": 1 } }, "additionalProperties": false },
{ "type": "object", "required": ["classification"], "properties": { "classification": { "type": "string" }, "weight": { "type": "number", "minimum": 0, "maximum": 1 } }, "additionalProperties": false },
{ "type": "object", "required": ["file_pattern"], "properties": { "file_pattern": { "type": "string" }, "weight": { "type": "number", "minimum": 0, "maximum": 1 } }, "additionalProperties": false }
]
}
},
"boundaries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"adr": { "type": "string", "pattern": "^ADR-\\d{3}$" },
"pair": { "type": "string", "pattern": "^#\\d+$" },
"relation": { "type": "string" },
"role": { "type": "string" }
}
}
},
"attributes": { "type": "object" },
"capabilities": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
}
}
}