Six example models next to the three C4 ones: arc42 (Cinema Tickets, IoT Telemetry, Team Wiki) by section, ArchiMate (Insurance Claims, HR Onboarding, Logistics Tracking) by layer, each validated with 0 errors and 0 warnings. resolveRefs and the editor schemas now take ref: in workflow and dataflow nodes, sequence participants and lifecycle states, as the skill already did. Example tests check each framework's folders.
526 lines
12 KiB
JSON
526 lines
12 KiB
JSON
{
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"title": "Archify Workflow Diagram",
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"schema_version",
|
||
"diagram_type",
|
||
"meta",
|
||
"lanes",
|
||
"nodes",
|
||
"edges"
|
||
],
|
||
"properties": {
|
||
"schema_version": {
|
||
"enum": [
|
||
1,
|
||
2
|
||
]
|
||
},
|
||
"diagram_type": {
|
||
"const": "workflow"
|
||
},
|
||
"meta": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"title",
|
||
"output"
|
||
],
|
||
"properties": {
|
||
"title": {
|
||
"type": "string",
|
||
"minLength": 1
|
||
},
|
||
"locale": {
|
||
"$ref": "common.schema.json#/$defs/locale"
|
||
},
|
||
"translations": {
|
||
"$ref": "common.schema.json#/$defs/translations"
|
||
},
|
||
"subtitle": {
|
||
"type": "string"
|
||
},
|
||
"output": {
|
||
"$ref": "common.schema.json#/$defs/portableOutputPath"
|
||
},
|
||
"animation": {
|
||
"enum": [
|
||
"trace",
|
||
"none"
|
||
]
|
||
},
|
||
"visual_preset": {
|
||
"enum": [
|
||
"classic",
|
||
"signal-flow",
|
||
"blueprint",
|
||
"editorial"
|
||
]
|
||
},
|
||
"quality_profile": {
|
||
"enum": [
|
||
"standard",
|
||
"showcase"
|
||
]
|
||
},
|
||
"repository": {
|
||
"$ref": "common.schema.json#/$defs/repository"
|
||
},
|
||
"views": {
|
||
"$ref": "common.schema.json#/$defs/guidedViews"
|
||
},
|
||
"legend": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"mode": {
|
||
"$ref": "common.schema.json#/$defs/legendMode"
|
||
},
|
||
"entries": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"frontend": {
|
||
"$ref": "common.schema.json#/$defs/legendEntry"
|
||
},
|
||
"backend": {
|
||
"$ref": "common.schema.json#/$defs/legendEntry"
|
||
},
|
||
"database": {
|
||
"$ref": "common.schema.json#/$defs/legendEntry"
|
||
},
|
||
"cloud": {
|
||
"$ref": "common.schema.json#/$defs/legendEntry"
|
||
},
|
||
"security": {
|
||
"$ref": "common.schema.json#/$defs/legendEntry"
|
||
},
|
||
"messagebus": {
|
||
"$ref": "common.schema.json#/$defs/legendEntry"
|
||
},
|
||
"external": {
|
||
"$ref": "common.schema.json#/$defs/legendEntry"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"viewBox": {
|
||
"type": "array",
|
||
"prefixItems": [
|
||
{
|
||
"type": "number",
|
||
"minimum": 700
|
||
},
|
||
{
|
||
"type": "number",
|
||
"minimum": 240
|
||
}
|
||
],
|
||
"items": false,
|
||
"minItems": 2,
|
||
"maxItems": 2
|
||
}
|
||
}
|
||
},
|
||
"lanes": {
|
||
"type": "array",
|
||
"minItems": 1,
|
||
"items": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"id",
|
||
"label"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
},
|
||
"label": {
|
||
"type": "string",
|
||
"minLength": 1
|
||
},
|
||
"variant": {
|
||
"enum": [
|
||
"normal",
|
||
"exception"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"phases": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"id",
|
||
"label",
|
||
"fromCol",
|
||
"toCol"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
},
|
||
"label": {
|
||
"type": "string",
|
||
"minLength": 1
|
||
},
|
||
"fromCol": {
|
||
"type": "integer",
|
||
"minimum": 0,
|
||
"maximum": 5
|
||
},
|
||
"toCol": {
|
||
"type": "integer",
|
||
"minimum": 0,
|
||
"maximum": 5
|
||
},
|
||
"variant": {
|
||
"enum": [
|
||
"default",
|
||
"emphasis",
|
||
"security",
|
||
"dashed"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"groups": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"id",
|
||
"label",
|
||
"lane",
|
||
"fromCol",
|
||
"toCol"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
},
|
||
"label": {
|
||
"type": "string",
|
||
"minLength": 1
|
||
},
|
||
"lane": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
},
|
||
"fromCol": {
|
||
"type": "integer",
|
||
"minimum": 0,
|
||
"maximum": 5
|
||
},
|
||
"toCol": {
|
||
"type": "integer",
|
||
"minimum": 0,
|
||
"maximum": 5
|
||
},
|
||
"variant": {
|
||
"enum": [
|
||
"default",
|
||
"emphasis",
|
||
"security",
|
||
"dashed"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"mainPath": {
|
||
"type": "array",
|
||
"minItems": 2,
|
||
"items": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
}
|
||
},
|
||
"semanticChecks": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"minProperties": 1,
|
||
"properties": {
|
||
"allowedRoots": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
}
|
||
},
|
||
"allowedTerminals": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
}
|
||
},
|
||
"requiredEdges": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/$defs/semanticRelation"
|
||
}
|
||
},
|
||
"requiredPaths": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/$defs/semanticRelation"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"nodes": {
|
||
"type": "array",
|
||
"minItems": 1,
|
||
"items": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"id": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
},
|
||
"lane": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
},
|
||
"col": {
|
||
"type": "integer",
|
||
"minimum": 0,
|
||
"maximum": 5
|
||
},
|
||
"type": {
|
||
"$ref": "common.schema.json#/$defs/componentType"
|
||
},
|
||
"label": {
|
||
"type": "string",
|
||
"minLength": 1
|
||
},
|
||
"sublabel": {
|
||
"type": "string"
|
||
},
|
||
"tag": {
|
||
"type": "string"
|
||
},
|
||
"icon": {
|
||
"$ref": "common.schema.json#/$defs/nodeIcon"
|
||
},
|
||
"brand": {
|
||
"$ref": "common.schema.json#/$defs/brandMark"
|
||
},
|
||
"sources": {
|
||
"$ref": "common.schema.json#/$defs/sourceReferences"
|
||
},
|
||
"width": {
|
||
"type": "number",
|
||
"minimum": 32
|
||
},
|
||
"height": {
|
||
"type": "number",
|
||
"minimum": 32
|
||
},
|
||
"yOffset": {
|
||
"type": "number"
|
||
},
|
||
"decisions": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string",
|
||
"minLength": 1
|
||
},
|
||
"description": "Ids of architecture decisions (*.archify-decision files of the model) this is about. Shown in the Decisions panel under the diagram."
|
||
},
|
||
"ref": {
|
||
"type": "string",
|
||
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
|
||
"description": "A shared element from the model’s registry (*.archify-registry). Its type, label, sublabel, brand and sources come from there; the diagram adds its own placement and may override label, sublabel and tag."
|
||
},
|
||
"diagram": {
|
||
"type": "string",
|
||
"description": "Diagram that explains this element, relative to the model root (main.archify). Double-click the node to open it."
|
||
}
|
||
},
|
||
"anyOf": [
|
||
{
|
||
"required": [
|
||
"ref",
|
||
"lane",
|
||
"col"
|
||
]
|
||
},
|
||
{
|
||
"required": [
|
||
"id",
|
||
"lane",
|
||
"col",
|
||
"type",
|
||
"label"
|
||
]
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"edges": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"from",
|
||
"to"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
},
|
||
"from": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
},
|
||
"to": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"variant": {
|
||
"$ref": "common.schema.json#/$defs/variant"
|
||
},
|
||
"role": {
|
||
"enum": [
|
||
"main",
|
||
"branch",
|
||
"async",
|
||
"return",
|
||
"error"
|
||
]
|
||
},
|
||
"fromSide": {
|
||
"$ref": "#/$defs/side"
|
||
},
|
||
"toSide": {
|
||
"$ref": "#/$defs/side"
|
||
},
|
||
"route": {
|
||
"enum": [
|
||
"auto",
|
||
"straight",
|
||
"drop",
|
||
"outside-right",
|
||
"return-left",
|
||
"bottom-channel",
|
||
"up-channel"
|
||
]
|
||
},
|
||
"via": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "common.schema.json#/$defs/point"
|
||
}
|
||
},
|
||
"labelAt": {
|
||
"$ref": "common.schema.json#/$defs/point"
|
||
},
|
||
"labelDx": {
|
||
"type": "number"
|
||
},
|
||
"labelDy": {
|
||
"type": "number"
|
||
},
|
||
"labelSegment": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"channelX": {
|
||
"type": "number"
|
||
},
|
||
"channelY": {
|
||
"type": "number"
|
||
},
|
||
"bias": {
|
||
"type": "number",
|
||
"minimum": 0,
|
||
"maximum": 1
|
||
},
|
||
"width": {
|
||
"type": "number",
|
||
"minimum": 0.5
|
||
},
|
||
"decisions": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string",
|
||
"minLength": 1
|
||
},
|
||
"description": "Ids of architecture decisions (*.archify-decision files of the model) this is about. Shown in the Decisions panel under the diagram."
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"cards": {
|
||
"$ref": "common.schema.json#/$defs/cards"
|
||
},
|
||
"model": {
|
||
"type": "object",
|
||
"description": "Only in main.archify: the entry point of a model (a folder of diagrams that belong together).",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"id",
|
||
"name"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
|
||
"description": "Stable id of the model."
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"description": "Name shown on the model page."
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"description": "What the model covers; shown on the model page."
|
||
}
|
||
}
|
||
},
|
||
"decisions": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string",
|
||
"minLength": 1
|
||
},
|
||
"description": "Ids of architecture decisions (*.archify-decision files of the model) this is about. Shown in the Decisions panel under the diagram."
|
||
}
|
||
},
|
||
"$defs": {
|
||
"semanticRelation": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"from",
|
||
"to"
|
||
],
|
||
"properties": {
|
||
"from": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
},
|
||
"to": {
|
||
"$ref": "common.schema.json#/$defs/id"
|
||
}
|
||
}
|
||
},
|
||
"side": {
|
||
"enum": [
|
||
"left",
|
||
"right",
|
||
"top",
|
||
"bottom"
|
||
]
|
||
}
|
||
}
|
||
}
|