Files
archify-vscode-ext/schemas/architecture.schema.json
root-at-skic 7a2b661afe Models: main.archify, registries, refs, links and the model page; 0.7.0
A folder with main.archify at its top is a model, a set of diagrams
that belong together. Opening main.archify shows the model page: the
model's name and description, its own overview diagram when the file
has one, the diagrams grouped by folder (click to open), and the
registry with where each element is used. The page is built by
traversing the folder tree and refreshes when files change.

*.archify-registry files define shared elements once; diagrams draw
them with `ref: <id>` plus position and may override label, sublabel
and tag. References are resolved before Archify runs, so Archify is
unchanged. Hover, go-to-definition and completion on ref; unknown
names, forbidden overrides, duplicate ids and broken registries in
Problems; registry edits re-render open diagrams. `diagram:` links on
elements and components open the linked diagram on double-click.

New command Archify | Open Model, a Model template for New Diagram…,
editor schemas for the new keys and for registries, docs/model.md and
examples/online-shop. Single diagrams behave exactly as before.
2026-10-19 11:37:20 +03:00

369 lines
9.1 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Archify Architecture Diagram",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"diagram_type",
"meta",
"components"
],
"properties": {
"schema_version": {
"const": 1
},
"diagram_type": {
"const": "architecture"
},
"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": {
"$ref": "common.schema.json#/$defs/animation"
},
"visual_preset": {
"$ref": "common.schema.json#/$defs/visualPreset"
},
"quality_profile": {
"$ref": "common.schema.json#/$defs/qualityProfile"
},
"engineering_profile": {
"enum": [
"deployment-ownership"
]
},
"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": 320
},
{
"type": "number",
"minimum": 240
}
],
"items": false,
"minItems": 2,
"maxItems": 2
}
}
},
"layout": {
"type": "object",
"additionalProperties": false,
"required": [
"mode"
],
"properties": {
"mode": {
"enum": [
"grid"
]
},
"origin": {
"$ref": "common.schema.json#/$defs/point"
},
"cols": {
"type": "integer",
"minimum": 1,
"maximum": 12
},
"gapX": {
"type": "number",
"minimum": 0
},
"gapY": {
"type": "number",
"minimum": 0
},
"cellW": {
"type": "number",
"minimum": 40
},
"cellH": {
"type": "number",
"minimum": 24
}
}
},
"components": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/id"
},
"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"
},
"row": {
"type": "integer",
"minimum": 0
},
"col": {
"type": "integer",
"minimum": 0
},
"pos": {
"$ref": "common.schema.json#/$defs/point"
},
"size": {
"type": "array",
"prefixItems": [
{
"type": "number",
"exclusiveMinimum": 0
},
{
"type": "number",
"exclusiveMinimum": 0
}
],
"items": false,
"minItems": 2,
"maxItems": 2
},
"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 pos/size 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"
]
},
{
"required": [
"id",
"type",
"label"
]
}
]
}
},
"boundaries": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"label",
"wraps"
],
"properties": {
"kind": {
"enum": [
"region",
"security-group"
]
},
"label": {
"type": "string",
"minLength": 1
},
"wraps": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "common.schema.json#/$defs/id"
}
},
"pad": {
"type": "number",
"minimum": 0
}
}
}
},
"connections": {
"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"
},
"fromSide": {
"$ref": "common.schema.json#/$defs/side"
},
"toSide": {
"$ref": "common.schema.json#/$defs/side"
},
"route": {
"enum": [
"auto",
"straight",
"orthogonal-h",
"orthogonal-v"
]
},
"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
},
"width": {
"$ref": "common.schema.json#/$defs/relationshipWidth"
}
}
}
},
"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."
}
}
}
}
}