{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://processgit.org/Valsts-Pirmkods/Architecture-as-Code/schemas/arhitektura-0.1.schema.json", "title": "Digitālās pārvaldes arhitektūras kā kods — shēma v0.1", "description": "Kopīga shēma visām VARAM digitālās pārvaldes arhitektūras jomām (horizontālajām un nozaru). Jomas reģistri ir YAML datnes; katru datni pārbauda pret vienu no šeit definētajiem tipiem (sk. x-roles). Identifikatori jomā ir lokāli (func.01); pilnais identifikators ir :, piemēram kultura-valoda:func.01. PPPA, Valsts Pirmkods. Melnraksts.", "x-roles": { "catalogue": "Catalogue", "manifest": "Manifest", "organizations": "OrganizationsFile", "functions": "FunctionsFile", "services": "ComponentsFile", "information_resources": "ComponentsFile", "systems": "ComponentsFile", "goals": "Goal", "roadmap": "ItemsFile", "interactions": "ItemsFile", "risks": "ItemsFile", "as_is_catalog": "ItemsFile", "relations": "EdgesFile", "meta": "AnyObject", "as_is": "AnyObject" }, "$defs": { "LocalId": { "description": "Lokālais identifikators jomā: prefikss un segmenti, piemēram func.01, svc.k.03, org.kisc, goal.m1, domain.kultura-valoda.", "type": "string", "pattern": "^[a-z][a-z_]*(\\.[A-Za-z0-9_-]+)+$" }, "Slug": {"type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"}, "VpkId": {"description": "VPK ID no Valsts kancelejas organizāciju reģistra (B01): SS-IIII.", "type": "string", "pattern": "^[0-9]{2}-[0-9]{4}$"}, "Text": {"type": "string", "minLength": 1}, "AnyObject": {"type": "object"}, "Catalogue": { "description": "domenas.yaml — visu VARAM digitālās pārvaldes arhitektūras jomu saraksts un katras jomas statuss šajā repozitorijā.", "type": "object", "required": ["version", "sources", "domains"], "properties": { "version": {"type": "string"}, "sources": {"type": "array", "items": {"type": "object", "required": ["url", "title"], "properties": {"url": {"type": "string", "format": "uri"}, "title": {"type": "string"}, "checked": {"type": "string", "format": "date"}}}}, "domains": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/CatalogueDomain"}} } }, "CatalogueDomain": { "type": "object", "required": ["slug", "title", "kind", "lead_institution", "varam_status", "as_code"], "properties": { "slug": {"$ref": "#/$defs/Slug"}, "title": {"$ref": "#/$defs/Text"}, "kind": {"enum": ["horizontal", "sectoral", "subdomain"], "description": "horizontal — horizontālā joma; sectoral — nozaru vai starpnozaru joma; subdomain — apakšjoma (parent norāda jomu)"}, "parent": {"$ref": "#/$defs/Slug"}, "lead_institution": {"$ref": "#/$defs/Text", "description": "Iestāde, kuras pārstāvis vada arhitektūras apraksta izstrādi (kā VARAM lapā). Personu kontaktdati netiek glabāti."}, "lead_vpk_id": {"$ref": "#/$defs/VpkId"}, "varam_status": {"enum": ["approved", "in_review", "in_development", "not_started"]}, "approved": {"type": "string", "format": "date"}, "approved_versions": {"type": "array", "items": {"type": "object", "required": ["version", "approved"], "properties": {"version": {"type": "string"}, "approved": {"type": "string", "format": "date"}}}}, "approved_by": {"type": "string"}, "description_url": {"type": "string", "format": "uri"}, "presentation_url": {"type": "string", "format": "uri"}, "as_code": { "type": "object", "required": ["status"], "properties": { "status": {"enum": ["transformed", "in_progress", "not_started"]}, "path": {"type": "string", "pattern": "^domains/[a-z0-9-]+$"}, "source": {"type": "string", "description": "No kura dokumenta pārveidots (datne mapē sources/)"} }, "if": {"properties": {"status": {"const": "transformed"}}}, "then": {"required": ["status", "path"]} } } }, "Manifest": { "description": "domains//manifest.yaml — jomas apraksts un tās reģistru atrašanās vieta.", "type": "object", "required": ["id", "title", "version", "status", "registers"], "properties": { "id": {"type": "string", "pattern": "^domain\\.[a-z0-9]+(-[a-z0-9]+)*$"}, "title": {"$ref": "#/$defs/Text"}, "version": {"type": "string"}, "status": {"enum": ["draft", "approved", "superseded"]}, "template_compliance": {"type": "boolean"}, "views": {"type": "array"}, "registers": { "type": "object", "description": "Reģistra loma → datne vai mape (relatīvi pret jomas mapi). Lomas: sk. x-roles.", "properties": { "organizations": {"type": "string"}, "functions": {"type": "string"}, "services": {"type": "string"}, "information_resources": {"type": "string"}, "systems": {"type": "string"}, "relations": {"type": "string"} }, "required": ["organizations", "functions", "relations"], "additionalProperties": {"type": "string"} } } }, "ItemsFile": {"type": "object", "required": ["items"], "properties": {"items": {"type": "array", "items": {"$ref": "#/$defs/Item"}}}}, "Item": {"type": "object", "required": ["id"], "properties": {"id": {"$ref": "#/$defs/LocalId"}}}, "OrganizationsFile": {"type": "object", "required": ["items"], "properties": {"items": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/Organization"}}}}, "Organization": { "type": "object", "required": ["id", "title", "role", "status"], "properties": { "id": {"type": "string", "pattern": "^org\\.[A-Za-z0-9_.-]+$"}, "title": {"$ref": "#/$defs/Text"}, "role": {"$ref": "#/$defs/Text"}, "responsibilities": {"type": "array", "items": {"type": "string"}}, "status": {"type": "string"}, "vpk_id": {"$ref": "#/$defs/VpkId", "description": "Iestādes VPK ID (B01). Ja nav norādīts, VDZP to meklē pēc nosaukuma un saiti atzīmē kā izgūtu."} } }, "FunctionsFile": {"type": "object", "required": ["items"], "properties": {"items": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/Function"}}}}, "Function": { "type": "object", "required": ["id", "name"], "properties": { "id": {"type": "string", "pattern": "^func\\.[A-Za-z0-9_.-]+$"}, "subdomain": {"$ref": "#/$defs/LocalId"}, "name": {"$ref": "#/$defs/Text"}, "change_status": {"type": "string"}, "change_description": {"type": "string"}, "performed_by": {"type": "array", "items": {"$ref": "#/$defs/LocalId"}, "description": "Organizācijas (org.*), kas veic funkciju"} } }, "ComponentsFile": {"type": "object", "required": ["items"], "properties": {"items": {"type": "array", "items": {"$ref": "#/$defs/Component"}}}}, "Component": { "description": "Pakalpojums, informācijas resurss vai informācijas sistēma.", "type": "object", "required": ["id", "name", "status"], "properties": { "id": {"$ref": "#/$defs/LocalId"}, "number": {}, "subdomain": {"$ref": "#/$defs/LocalId"}, "name": {"$ref": "#/$defs/Text"}, "status": {"type": "string"}, "description": {"type": "string"}, "change_description": {"type": "string"}, "resources": {} } }, "Goal": { "type": "object", "required": ["id", "title"], "properties": {"id": {"type": "string", "pattern": "^goal\\.[A-Za-z0-9_.-]+$"}, "code": {"type": "string"}, "title": {"$ref": "#/$defs/Text"}, "description": {"type": "string"}, "status": {"type": "string"}} }, "EdgesFile": {"type": "object", "required": ["edges"], "properties": {"edges": {"type": "array", "items": {"$ref": "#/$defs/Edge"}}}}, "Edge": { "type": "object", "required": ["from", "type", "to"], "properties": { "from": {"$ref": "#/$defs/LocalId"}, "type": {"type": "string", "pattern": "^[a-z]+(_[a-z]+)*$", "description": "Saites veids, piemēram has_goal, has_function, has_service, has_information_resource, has_system, performed_by, uses, provides"}, "to": {"$ref": "#/$defs/LocalId"} }, "additionalProperties": false } } }