{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://gitea.dohertylan.com/dohertj2/3yearplan/raw/branch/main/schemas/format/uns-subtree.schema.json", "title": "UNS Subtree (per-site)", "description": "Declares the canonical UNS subtree for a site: Enterprise (level 1) + Site (level 2) + the Areas / Lines that exist at that site. Equipment (level 5) is configured per-cluster in OtOpcUa, not declared here — this file defines the higher-level structure operators are required to use.", "type": "object", "required": ["enterprise", "site", "areas"], "additionalProperties": false, "properties": { "enterprise": { "type": "string", "pattern": "^[a-z0-9-]{1,32}$", "description": "UNS level 1. Must match `ServerCluster.Enterprise` in every OtOpcUa cluster at this site." }, "site": { "type": "string", "pattern": "^[a-z0-9-]{1,32}$", "description": "UNS level 2. Must match `ServerCluster.Site` in every OtOpcUa cluster at this site." }, "displayName": { "type": "string", "minLength": 1, "maxLength": 128, "description": "Human-readable site name (e.g. 'Warsaw West')." }, "areas": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["name", "displayName"], "additionalProperties": false, "properties": { "name": { "anyOf": [ { "type": "string", "pattern": "^[a-z0-9-]{1,32}$" }, { "const": "_default" } ], "description": "UNS level 3 segment. `_default` is the reserved placeholder for sites where Area doesn't apply." }, "displayName": { "type": "string", "minLength": 1, "maxLength": 128 }, "lines": { "type": "array", "items": { "type": "object", "required": ["name", "displayName"], "additionalProperties": false, "properties": { "name": { "anyOf": [ { "type": "string", "pattern": "^[a-z0-9-]{1,32}$" }, { "const": "_default" } ], "description": "UNS level 4 segment." }, "displayName": { "type": "string", "minLength": 1, "maxLength": 128 } } } } } } } } }