Seed the canonical OT schemas content under 3yearplan/schemas/ as a temporary location until a dedicated schemas repo is created (Gitea push-to-create is disabled, the dedicated repo needs a manual UI step). Initial seed contributed by the OtOpcUa team to unblock the EquipmentClassRef integration timeline (lmxopcua decision #112) and to provide the future cross-team owner with a concrete starting point rather than a blank slate. Marked DRAFT throughout with prominent "ownership TBD" framing in README and CONTRIBUTING — the future owner team should treat this seed as a starting point and revise format / structure / naming as the open questions in README "Open Questions" get resolved.

Includes: README explaining purpose / scope / temporary-location framing / format decision, CONTRIBUTING.md with proposed workflow + per-class semver versioning policy + validation commands, format/equipment-class.schema.json defining the shape of a class template (classId, version, displayName, applicability, signals, alarms, optional stateModel), format/tag-definition.schema.json defining the shape of a single canonical signal (name, dataType, category, unit, isArray, accessLevel, writeIdempotent, isHistorized, scaling), format/uns-subtree.schema.json defining the shape of a per-site UNS subtree (enterprise + site + areas + lines), classes/fanuc-cnc.json as the worked pilot class with 16 signals + 3 alarms + suggested state-derivation notes (per OtOpcUa corrections doc D1), uns/example-warsaw-west.json as a worked UNS subtree example, docs/overview.md (what / why / lifecycle / what's NOT in this repo), docs/format-decisions.md (8 numbered decisions covering JSON Schema choice per corrections D2, per-class semver, additive-only minor bumps, _default placeholder reservation, signal-name vs UNS-segment regex distinction, stateModel-as-informational, no per-equipment overrides at this layer, applicability.drivers as OtOpcUa driver enumeration), docs/consumer-integration.md (how OtOpcUa / Redpanda / dbt each integrate). $id URLs in the JSON schemas resolve at the actual current path so validators don't 404.

Top-level README adds a row to the Component Detail Files table pointing to schemas/. Corrections doc B2 (schemas-repo dependencies) marked partially RESOLVED with the seed location and a list of what still needs the plan team or cross-team owner to decide (owner team naming, dedicated repo migration, format-decision ratification, FANUC CNC pilot confirmation, CI gate setup, Redpanda + dbt consumer integration plumbing).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-04-17 12:35:27 -04:00
parent dee56a6846
commit 5953685ffb
12 changed files with 651 additions and 1 deletions

View File

@@ -0,0 +1,64 @@
{
"$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 }
}
}
}
}
}
}
}
}