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.
276 lines
6.8 KiB
JSON
276 lines
6.8 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "Archify Sequence Diagram",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"schema_version",
|
|
"diagram_type",
|
|
"meta",
|
|
"participants",
|
|
"messages"
|
|
],
|
|
"properties": {
|
|
"schema_version": {
|
|
"const": 1
|
|
},
|
|
"diagram_type": {
|
|
"const": "sequence"
|
|
},
|
|
"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"
|
|
},
|
|
"column_fit": {
|
|
"description": "Horizontal participant layout. Omit this field or use fixed for the stable 86px boxes and 108px gap. Use spread when a wide viewBox would leave unused horizontal space or meaningful participant labels do not fit the fixed boxes; spread derives wider boxes and gaps from the viewBox without changing participant order or message semantics.",
|
|
"enum": [
|
|
"fixed",
|
|
"spread"
|
|
]
|
|
},
|
|
"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": {
|
|
"default": {
|
|
"$ref": "common.schema.json#/$defs/legendEntry"
|
|
},
|
|
"emphasis": {
|
|
"$ref": "common.schema.json#/$defs/legendEntry"
|
|
},
|
|
"security": {
|
|
"$ref": "common.schema.json#/$defs/legendEntry"
|
|
},
|
|
"dashed": {
|
|
"$ref": "common.schema.json#/$defs/legendEntry"
|
|
},
|
|
"return": {
|
|
"$ref": "common.schema.json#/$defs/legendEntry"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"viewBox": {
|
|
"type": "array",
|
|
"prefixItems": [
|
|
{
|
|
"type": "number",
|
|
"minimum": 480
|
|
},
|
|
{
|
|
"type": "number",
|
|
"minimum": 480
|
|
}
|
|
],
|
|
"items": false,
|
|
"minItems": 2,
|
|
"maxItems": 2
|
|
}
|
|
}
|
|
},
|
|
"participants": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"id",
|
|
"type",
|
|
"label"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"$ref": "common.schema.json#/$defs/id"
|
|
},
|
|
"type": {
|
|
"$ref": "common.schema.json#/$defs/componentType"
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"sublabel": {
|
|
"type": "string"
|
|
},
|
|
"icon": {
|
|
"$ref": "common.schema.json#/$defs/nodeIcon"
|
|
},
|
|
"brand": {
|
|
"$ref": "common.schema.json#/$defs/brandMark"
|
|
},
|
|
"sources": {
|
|
"$ref": "common.schema.json#/$defs/sourceReferences"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"segments": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"from",
|
|
"to",
|
|
"label"
|
|
],
|
|
"properties": {
|
|
"from": {
|
|
"type": "number"
|
|
},
|
|
"to": {
|
|
"type": "number"
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"from",
|
|
"to",
|
|
"y",
|
|
"label"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"$ref": "common.schema.json#/$defs/id"
|
|
},
|
|
"from": {
|
|
"$ref": "common.schema.json#/$defs/id"
|
|
},
|
|
"to": {
|
|
"$ref": "common.schema.json#/$defs/id"
|
|
},
|
|
"y": {
|
|
"type": "number",
|
|
"minimum": 160
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"variant": {
|
|
"enum": [
|
|
"default",
|
|
"emphasis",
|
|
"security",
|
|
"dashed",
|
|
"return"
|
|
]
|
|
},
|
|
"note": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"activations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"participant",
|
|
"from",
|
|
"to"
|
|
],
|
|
"properties": {
|
|
"participant": {
|
|
"$ref": "common.schema.json#/$defs/id"
|
|
},
|
|
"from": {
|
|
"type": "number"
|
|
},
|
|
"to": {
|
|
"type": "number"
|
|
},
|
|
"type": {
|
|
"$ref": "common.schema.json#/$defs/componentType"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|