feat: introduce archify skill for generating architecture diagrams
- Added a new Archify skill, enabling users to create polished architecture, workflow, sequence, data-flow, and lifecycle diagrams. - Implemented comprehensive functionality including rendering, validation, and delivery of diagrams in various formats. - Integrated a user-friendly command-line interface for generating and previewing diagrams. - Developed supporting files including package.json, LICENSE, and SKILL.md for documentation and licensing. - Added unit tests to ensure reliability and functionality of the new skill. These changes enhance the application by providing a structured approach to visualizing system architecture and workflows, improving user experience and data representation.
This commit is contained in:
@@ -0,0 +1,211 @@
|
||||
# Archify JSON IR Schemas
|
||||
|
||||
Each typed renderer consumes a JSON intermediate representation (IR) validated
|
||||
against one of the schemas in this folder before any layout work happens.
|
||||
|
||||
## Files
|
||||
|
||||
| Schema | Governs | Structural arrays |
|
||||
|--------|---------|-------------------|
|
||||
| `workflow.schema.json` | `diagram_type: "workflow"` | `lanes`, `phases`, `groups`, `mainPath`, `nodes`, `edges` |
|
||||
| `sequence.schema.json` | `diagram_type: "sequence"` | `participants`, `segments`, `messages`, `activations` |
|
||||
| `dataflow.schema.json` | `diagram_type: "dataflow"` | `stages`, `nodes`, `flows` |
|
||||
| `lifecycle.schema.json` | `diagram_type: "lifecycle"` | `lanes`, `states`, `transitions` |
|
||||
| `architecture.schema.json` | `diagram_type: "architecture"` | `components`, `boundaries`, `connections` |
|
||||
| `common.schema.json` | shared `$defs` only (no top-level document) | — |
|
||||
|
||||
Every diagram schema requires `schema_version`, `diagram_type`, `meta` (with
|
||||
`title`), and its structural arrays — except `segments`, `activations`, and
|
||||
`cards`, which are optional — and sets `additionalProperties: false` at every
|
||||
level, so unknown fields are rejected rather than silently ignored.
|
||||
|
||||
Every `meta` object also accepts `animation: "trace"` for opt-in SVG/CSS motion
|
||||
in generated HTML. Omit it, or set `"none"`, for the default static output.
|
||||
It also accepts `locale: "en" | "zh-CN"`. The field selects the fixed Viewer
|
||||
UI, renderer-owned default legend and accessibility copy, document-title
|
||||
suffix, and `<html lang>` value; it does not translate authored strings.
|
||||
Omitting it preserves legacy behavior and resolves to English. Unsupported
|
||||
locale values fail schema validation instead of being guessed or silently
|
||||
rewritten.
|
||||
`visual_preset` accepts `classic` (the stable default), `signal-flow` (luminous
|
||||
motion-forward presentation), `blueprint` (high-contrast engineering review),
|
||||
or `editorial` (warm publication-style design review and documentation).
|
||||
Presets change only viewer styling; they do not alter semantic IDs or geometry.
|
||||
Sequence `meta` additionally accepts `column_fit`. The default `fixed` keeps
|
||||
the historical 108px column gap and 86px participant boxes, so an authored
|
||||
diagram renders at the same coordinates no matter how wide its viewBox is.
|
||||
`spread` derives the gap and box width from the viewBox instead, which turns a
|
||||
wide canvas into column distance and label room rather than empty space on the
|
||||
right. Lane order, IDs, and message semantics are unchanged either way.
|
||||
|
||||
It may also include up to five guided `views`. Each view has a unique `id`, a
|
||||
reader-facing `label`, a non-empty `focus` list of existing semantic node IDs,
|
||||
and an optional short `note`.
|
||||
|
||||
### Legend presentation contract
|
||||
|
||||
Every `meta` object accepts the same optional legend shape without changing
|
||||
the schema version already selected for that renderer:
|
||||
|
||||
```json
|
||||
"legend": {
|
||||
"mode": "auto",
|
||||
"entries": {
|
||||
"security": { "label": "restricted data", "visible": true }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`mode` is `auto` (the default), `all`, or `hidden`. `auto` includes only kinds
|
||||
present in typed IR; `all` includes the renderer's full stable catalog;
|
||||
`hidden` removes the complete legend and takes precedence over entry overrides.
|
||||
Architecture documents that omit an explicit `viewBox` size that automatic
|
||||
viewBox from the same measured resolved legend footprint used for final SVG
|
||||
layout. Across all renderers, legacy documents that omit `meta.legend` use a
|
||||
compatibility-safe implicit `auto`: if the resolved legend cannot fit an
|
||||
explicit authored viewBox without overlap, Archify omits the complete legend
|
||||
instead of turning a previously valid schema-v1 document into a hard failure.
|
||||
Once an author adds `meta.legend` (including explicit `mode: "auto"`), the
|
||||
layout is intentional and unfit labels or bands fail with a path-prefixed
|
||||
diagnostic. An entry may set a non-empty, bounded `label`, boolean `visible`,
|
||||
or both.
|
||||
`visible: false` removes a resolved entry and `visible: true` forces a supported
|
||||
but unused kind into the visual legend. Unknown kinds and properties fail
|
||||
strict validation.
|
||||
|
||||
Supported keys are renderer-owned:
|
||||
|
||||
| Renderer | `meta.legend.entries` keys |
|
||||
|---|---|
|
||||
| Architecture | `frontend`, `backend`, `database`, `cloud`, `security`, `messagebus`, `external` |
|
||||
| Workflow | `frontend`, `backend`, `security`, `messagebus`, `database`, `cloud`, `external` |
|
||||
| Sequence | `emphasis`, `return`, `security`, `dashed`, `default` |
|
||||
| Dataflow | `emphasis`, `security`, `dashed`, `database`, `default` |
|
||||
| Lifecycle | `start`, `active`, `waiting`, `decision`, `success`, `failure`, `neutral`, `external` |
|
||||
|
||||
Labels are presentation only: they do not rename the stable kind, change
|
||||
nodes/relationships, or create Semantic Lens edge facts. Sequence message and
|
||||
Dataflow flow-variant entries are visual keys. Component/state entries backed
|
||||
by exact compiled node facts receive the interactive Semantic Legend bridge;
|
||||
this includes Dataflow `database` when a real `nodes[].type: "database"` fact
|
||||
exists.
|
||||
|
||||
Every relationship collection (`connections`, `edges`, `messages`, `flows`, and
|
||||
`transitions`) accepts an optional author-controlled `id` using the shared ID
|
||||
pattern. The renderer keeps its source-order runtime key separately, while the
|
||||
authored ID enables a stable `#relation=<id>` viewer link that survives array
|
||||
reordering. ID-less documents remain valid and their relationship pins stay
|
||||
local to the current page.
|
||||
|
||||
Every semantic node collection (`components`, `nodes`, `participants`, and
|
||||
`states`) also accepts one optional `brand`: either a canonical string returned
|
||||
by `archify brands --json`, or a digest-pinned `{ "url", "sha256" }` object
|
||||
returned by `archify brands capture <url> --json`. Known IDs and known-brand
|
||||
domains use the bundled vector catalogue. Unknown URLs must be captured in that
|
||||
explicit command before authoring; render and validate never perform an
|
||||
unpinned network capture. Unsafe, unavailable, changed, or unsupported content
|
||||
fails closed with a brand diagnostic. Omitted `brand` preserves the prior
|
||||
output.
|
||||
|
||||
## schema_version policy
|
||||
|
||||
Workflow supports schema versions 1 and 2. Version 1 remains the fixed-layout
|
||||
compatibility contract; version 2 opts into the readable workflow compiler and
|
||||
can be produced explicitly with `archify migrate workflow ... --to-schema 2`.
|
||||
The other four diagram schemas keep `schema_version` pinned to `1`.
|
||||
|
||||
Workflow also accepts optional `semanticChecks`. `allowedRoots` and
|
||||
`allowedTerminals` close the set of intentional graph sources and sinks;
|
||||
`requiredEdges` requires exact authored relationships; and `requiredPaths`
|
||||
requires directed reachability while allowing intermediate nodes. The compiler
|
||||
evaluates these facts before layout and returns typed `workflow/*` diagnostics.
|
||||
The field is additive and geometry-neutral: omitting it preserves existing
|
||||
workflow behavior and including a satisfied contract does not change SVG or
|
||||
layout-receipt bytes.
|
||||
|
||||
A file that validates today must keep validating and rendering within its
|
||||
declared version throughout the 2.x release line. Additive viewer,
|
||||
accessibility, and presentation improvements may enhance generated HTML, but
|
||||
they must not reinterpret authored IR or turn a previously valid profile-less
|
||||
v1 file into a new hard layout failure. Breaking IR changes require a new
|
||||
version; additive, backwards-compatible fields do not.
|
||||
|
||||
## Shared definitions (common.schema.json)
|
||||
|
||||
The five diagram schemas reference `common.schema.json#/$defs/...`:
|
||||
|
||||
- `id` — element identifiers, pattern `^[a-zA-Z][a-zA-Z0-9_-]*$`
|
||||
- `point` — an `[x, y]` pair of numbers (used by `via` and `labelAt`)
|
||||
- `componentType` — `frontend`, `backend`, `database`, `cloud`, `security`,
|
||||
`messagebus`, `external`
|
||||
- `locale` — the bounded renderer locale, `en` or `zh-CN`
|
||||
- `brandMark` — one optional built-in brand ID or explicit HTTP(S) site URL
|
||||
- `variant` — `default`, `emphasis`, `security`, `dashed` (sequence messages
|
||||
extend this list locally with `return`)
|
||||
- `legendMode` and `legendEntry` — the shared strict mode and label/visibility
|
||||
override shapes used by each renderer-owned key map
|
||||
- `guidedViews` — the bounded, read-only reader paths accepted by `meta.views`
|
||||
- `cards` — the summary-card blocks rendered below the SVG
|
||||
|
||||
Lifecycle state `type` is mode-specific (`start`/`active`/`waiting`/...) and
|
||||
stays in `lifecycle.schema.json`.
|
||||
|
||||
## Runtime validation
|
||||
|
||||
At development time, `scripts/generate-validators.mjs` compiles all five
|
||||
schemas with ajv's draft 2020-12 standalone generator using `strict: true` and
|
||||
`allErrors: true`. The generated `renderers/shared/generated-validators.mjs`
|
||||
is committed and shipped with the skill, so runtime validation has no npm or
|
||||
network dependency. `renderers/shared/validator.mjs` applies the matching
|
||||
standalone validator before the renderer's own layout checks.
|
||||
The shared loader then checks cross-collection facts that JSON Schema cannot
|
||||
express cleanly here: duplicate view IDs, duplicate focus IDs, focus IDs that do
|
||||
not exist in the diagram's semantic collection, and duplicate authored
|
||||
relationship IDs within the mode's relationship collection.
|
||||
|
||||
Architecture additionally supports opt-in, revision-pinned repository evidence.
|
||||
`meta.repository` names a public GitHub URL and full commit SHA; a component may
|
||||
carry one to three `sources` with repo-relative POSIX paths, optional line
|
||||
ranges, and optional labels. Shape is schema-checked, then the renderer requires
|
||||
`--repo-root`: the local Git origin must match, and Git must prove the commit,
|
||||
blobs, and requested lines. Verified evidence is embedded outside the canonical
|
||||
SVG for the Semantic Passport and Node Finder; ordinary documents and visual
|
||||
exports carry no repository evidence.
|
||||
|
||||
## Visual quality and engineering truth
|
||||
|
||||
`meta.quality_profile` and `meta.engineering_profile` answer different
|
||||
questions. `quality_profile` is available in all five modes and controls how
|
||||
strictly Archify judges composition. `engineering_profile` is an optional
|
||||
Architecture-only semantic contract; omitting it preserves the ordinary v1
|
||||
behavior.
|
||||
|
||||
The first engineering profile is `deployment-ownership`. Enable it only when
|
||||
the user wants a fail-closed deployment review and the source facts are known.
|
||||
It requires every non-external component to name an owner in `tag` and belong
|
||||
to exactly one `region`; the document must contain both `region` and
|
||||
`security-group` boundaries; every `database` must be inside a
|
||||
`security-group`; each security group must contain members from one shared
|
||||
region; and every connection whose region or security-group membership changes
|
||||
must name the real crossing mechanism in `label`.
|
||||
|
||||
The profile validates only authored IR. It does not discover infrastructure,
|
||||
infer owners, or prove that a diagram matches a live environment. If a fact is
|
||||
unknown, leave the profile unset or obtain the fact instead of inventing it.
|
||||
|
||||
`npm test` runs the generator in check mode and fails when the committed
|
||||
validators drift from their schemas.
|
||||
|
||||
## Error format
|
||||
|
||||
Schema violations exit non-zero. Each ajv error is reported on its own line as
|
||||
the instance path — annotated with the nearest enclosing element's `id` or
|
||||
`label` — followed by the message and parameters:
|
||||
|
||||
```text
|
||||
workflow schema validation failed:
|
||||
/nodes/3 (id/label: "router") must NOT have additional properties {"additionalProperty":"colour"}
|
||||
```
|
||||
|
||||
Schemas catch shape errors (types, enums, ranges, unknown fields); geometry
|
||||
problems such as overlaps and label collisions are the renderers' job.
|
||||
@@ -0,0 +1,176 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/tt-a1i/archify/schemas/architecture.schema.json",
|
||||
"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"],
|
||||
"properties": {
|
||||
"title": { "type": "string", "minLength": 1 },
|
||||
"locale": { "$ref": "common.schema.json#/$defs/locale" },
|
||||
"subtitle": { "type": "string" },
|
||||
"output": { "type": "string" },
|
||||
"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": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["url", "revision"],
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"pattern": "^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"
|
||||
},
|
||||
"revision": { "type": "string", "pattern": "^[a-fA-F0-9]{40}$" }
|
||||
}
|
||||
},
|
||||
"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,
|
||||
"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" },
|
||||
"tag": { "type": "string" },
|
||||
"brand": { "$ref": "common.schema.json#/$defs/brandMark" },
|
||||
"sources": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 3,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["path"],
|
||||
"properties": {
|
||||
"path": { "type": "string", "minLength": 1, "maxLength": 240 },
|
||||
"line": { "type": "integer", "minimum": 1 },
|
||||
"end_line": { "type": "integer", "minimum": 1 },
|
||||
"label": { "type": "string", "minLength": 1, "maxLength": 48 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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" }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/tt-a1i/archify/schemas/common.schema.json",
|
||||
"title": "Archify Shared Definitions",
|
||||
"$defs": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$"
|
||||
},
|
||||
"locale": {
|
||||
"enum": ["en", "zh-CN"]
|
||||
},
|
||||
"animation": {
|
||||
"enum": ["trace", "none"]
|
||||
},
|
||||
"visualPreset": {
|
||||
"enum": ["classic", "signal-flow", "blueprint", "editorial"]
|
||||
},
|
||||
"qualityProfile": {
|
||||
"enum": ["standard", "showcase"]
|
||||
},
|
||||
"side": {
|
||||
"enum": ["left", "right", "top", "bottom"]
|
||||
},
|
||||
"relationshipWidth": {
|
||||
"type": "number",
|
||||
"minimum": 0.5
|
||||
},
|
||||
"point": {
|
||||
"type": "array",
|
||||
"prefixItems": [
|
||||
{ "type": "number" },
|
||||
{ "type": "number" }
|
||||
],
|
||||
"items": false,
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
},
|
||||
"componentType": {
|
||||
"enum": ["frontend", "backend", "database", "cloud", "security", "messagebus", "external"]
|
||||
},
|
||||
"brandMark": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 2048,
|
||||
"anyOf": [
|
||||
{ "maxLength": 80, "pattern": "^[^\\r\\n]+$" },
|
||||
{ "pattern": "^https?://" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["url", "sha256"],
|
||||
"properties": {
|
||||
"url": { "type": "string", "minLength": 8, "maxLength": 2048, "pattern": "^https?://" },
|
||||
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"variant": {
|
||||
"enum": ["default", "emphasis", "security", "dashed"]
|
||||
},
|
||||
"legendMode": {
|
||||
"enum": ["auto", "all", "hidden"]
|
||||
},
|
||||
"legendEntry": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"minProperties": 1,
|
||||
"properties": {
|
||||
"label": { "type": "string", "minLength": 1, "maxLength": 80 },
|
||||
"visible": { "type": "boolean" }
|
||||
}
|
||||
},
|
||||
"guidedViews": {
|
||||
"type": "array",
|
||||
"maxItems": 5,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["id", "label", "focus"],
|
||||
"properties": {
|
||||
"id": { "$ref": "#/$defs/id" },
|
||||
"label": { "type": "string", "minLength": 1, "maxLength": 48 },
|
||||
"focus": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": { "$ref": "#/$defs/id" }
|
||||
},
|
||||
"note": { "type": "string", "maxLength": 140 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"cards": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["dot", "title", "items"],
|
||||
"properties": {
|
||||
"dot": { "enum": ["cyan", "emerald", "violet", "amber", "rose", "orange", "slate"] },
|
||||
"title": { "type": "string", "minLength": 1 },
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/tt-a1i/archify/schemas/dataflow.schema.json",
|
||||
"title": "Archify Data Flow Diagram",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schema_version",
|
||||
"diagram_type",
|
||||
"meta",
|
||||
"stages",
|
||||
"nodes",
|
||||
"flows"
|
||||
],
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": 1
|
||||
},
|
||||
"diagram_type": {
|
||||
"const": "dataflow"
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"title"
|
||||
],
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"locale": {
|
||||
"$ref": "common.schema.json#/$defs/locale"
|
||||
},
|
||||
"subtitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"output": {
|
||||
"type": "string"
|
||||
},
|
||||
"animation": {
|
||||
"$ref": "common.schema.json#/$defs/animation"
|
||||
},
|
||||
"visual_preset": {
|
||||
"$ref": "common.schema.json#/$defs/visualPreset"
|
||||
},
|
||||
"quality_profile": {
|
||||
"$ref": "common.schema.json#/$defs/qualityProfile"
|
||||
},
|
||||
"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" },
|
||||
"database": { "$ref": "common.schema.json#/$defs/legendEntry" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"viewBox": {
|
||||
"type": "array",
|
||||
"prefixItems": [
|
||||
{
|
||||
"type": "number",
|
||||
"minimum": 360
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"minimum": 360
|
||||
}
|
||||
],
|
||||
"items": false,
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"stages": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 5,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"label"
|
||||
],
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nodes": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"type",
|
||||
"label",
|
||||
"stage",
|
||||
"row"
|
||||
],
|
||||
"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"
|
||||
},
|
||||
"brand": {
|
||||
"$ref": "common.schema.json#/$defs/brandMark"
|
||||
},
|
||||
"stage": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"row": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"minimum": 48
|
||||
},
|
||||
"height": {
|
||||
"type": "number",
|
||||
"minimum": 36
|
||||
},
|
||||
"yOffset": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"flows": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"from",
|
||||
"to",
|
||||
"label"
|
||||
],
|
||||
"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",
|
||||
"minLength": 1
|
||||
},
|
||||
"classification": {
|
||||
"type": "string"
|
||||
},
|
||||
"variant": {
|
||||
"$ref": "common.schema.json#/$defs/variant"
|
||||
},
|
||||
"route": {
|
||||
"enum": [
|
||||
"auto",
|
||||
"straight",
|
||||
"vertical-channel",
|
||||
"bottom-channel",
|
||||
"top-channel"
|
||||
]
|
||||
},
|
||||
"fromSide": {
|
||||
"$ref": "common.schema.json#/$defs/side"
|
||||
},
|
||||
"toSide": {
|
||||
"$ref": "common.schema.json#/$defs/side"
|
||||
},
|
||||
"channelX": {
|
||||
"type": "number"
|
||||
},
|
||||
"channelY": {
|
||||
"type": "number"
|
||||
},
|
||||
"labelAt": {
|
||||
"$ref": "common.schema.json#/$defs/point"
|
||||
},
|
||||
"labelDx": {
|
||||
"type": "number"
|
||||
},
|
||||
"labelDy": {
|
||||
"type": "number"
|
||||
},
|
||||
"labelSegment": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"via": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "common.schema.json#/$defs/point"
|
||||
}
|
||||
},
|
||||
"width": {
|
||||
"$ref": "common.schema.json#/$defs/relationshipWidth"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cards": {
|
||||
"$ref": "common.schema.json#/$defs/cards"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,266 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/tt-a1i/archify/schemas/lifecycle.schema.json",
|
||||
"title": "Archify Lifecycle Diagram",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schema_version",
|
||||
"diagram_type",
|
||||
"meta",
|
||||
"lanes",
|
||||
"states",
|
||||
"transitions"
|
||||
],
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": 1
|
||||
},
|
||||
"diagram_type": {
|
||||
"const": "lifecycle"
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"title"
|
||||
],
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"locale": {
|
||||
"$ref": "common.schema.json#/$defs/locale"
|
||||
},
|
||||
"subtitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"output": {
|
||||
"type": "string"
|
||||
},
|
||||
"animation": {
|
||||
"$ref": "common.schema.json#/$defs/animation"
|
||||
},
|
||||
"visual_preset": {
|
||||
"$ref": "common.schema.json#/$defs/visualPreset"
|
||||
},
|
||||
"quality_profile": {
|
||||
"$ref": "common.schema.json#/$defs/qualityProfile"
|
||||
},
|
||||
"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": {
|
||||
"start": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
||||
"active": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
||||
"waiting": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
||||
"decision": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
||||
"success": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
||||
"failure": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
||||
"neutral": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
||||
"external": { "$ref": "common.schema.json#/$defs/legendEntry" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"viewBox": {
|
||||
"type": "array",
|
||||
"prefixItems": [
|
||||
{
|
||||
"type": "number",
|
||||
"minimum": 420
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"minimum": 566
|
||||
}
|
||||
],
|
||||
"items": false,
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"lanes": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 4,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"label"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "common.schema.json#/$defs/id"
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"states": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"type",
|
||||
"label",
|
||||
"lane",
|
||||
"col"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "common.schema.json#/$defs/id"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"start",
|
||||
"active",
|
||||
"waiting",
|
||||
"decision",
|
||||
"success",
|
||||
"failure",
|
||||
"neutral",
|
||||
"external"
|
||||
]
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"sublabel": {
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string"
|
||||
},
|
||||
"brand": {
|
||||
"$ref": "common.schema.json#/$defs/brandMark"
|
||||
},
|
||||
"step": {
|
||||
"type": "string"
|
||||
},
|
||||
"lane": {
|
||||
"$ref": "common.schema.json#/$defs/id"
|
||||
},
|
||||
"col": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 4
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"minimum": 48
|
||||
},
|
||||
"height": {
|
||||
"type": "number",
|
||||
"minimum": 36
|
||||
},
|
||||
"yOffset": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"transitions": {
|
||||
"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"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"variant": {
|
||||
"$ref": "common.schema.json#/$defs/variant"
|
||||
},
|
||||
"route": {
|
||||
"enum": [
|
||||
"auto",
|
||||
"straight",
|
||||
"drop",
|
||||
"bottom-channel",
|
||||
"top-channel",
|
||||
"right-channel",
|
||||
"left-channel"
|
||||
]
|
||||
},
|
||||
"fromSide": {
|
||||
"$ref": "common.schema.json#/$defs/side"
|
||||
},
|
||||
"toSide": {
|
||||
"$ref": "common.schema.json#/$defs/side"
|
||||
},
|
||||
"channelX": {
|
||||
"type": "number"
|
||||
},
|
||||
"channelY": {
|
||||
"type": "number"
|
||||
},
|
||||
"cornerRadius": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"labelAt": {
|
||||
"$ref": "common.schema.json#/$defs/point"
|
||||
},
|
||||
"labelDx": {
|
||||
"type": "number"
|
||||
},
|
||||
"labelDy": {
|
||||
"type": "number"
|
||||
},
|
||||
"labelSegment": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"via": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "common.schema.json#/$defs/point"
|
||||
}
|
||||
},
|
||||
"width": {
|
||||
"$ref": "common.schema.json#/$defs/relationshipWidth"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cards": {
|
||||
"$ref": "common.schema.json#/$defs/cards"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/tt-a1i/archify/schemas/sequence.schema.json",
|
||||
"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"
|
||||
],
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"locale": {
|
||||
"$ref": "common.schema.json#/$defs/locale"
|
||||
},
|
||||
"subtitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"output": {
|
||||
"type": "string"
|
||||
},
|
||||
"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"]
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"brand": {
|
||||
"$ref": "common.schema.json#/$defs/brandMark"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,428 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/tt-a1i/archify/schemas/workflow.schema.json",
|
||||
"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"
|
||||
],
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"locale": {
|
||||
"$ref": "common.schema.json#/$defs/locale"
|
||||
},
|
||||
"subtitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"output": {
|
||||
"type": "string"
|
||||
},
|
||||
"animation": {
|
||||
"enum": [
|
||||
"trace",
|
||||
"none"
|
||||
]
|
||||
},
|
||||
"visual_preset": {
|
||||
"enum": [
|
||||
"classic",
|
||||
"signal-flow",
|
||||
"blueprint",
|
||||
"editorial"
|
||||
]
|
||||
},
|
||||
"quality_profile": {
|
||||
"enum": [
|
||||
"standard",
|
||||
"showcase"
|
||||
]
|
||||
},
|
||||
"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,
|
||||
"required": [
|
||||
"id",
|
||||
"lane",
|
||||
"col",
|
||||
"type",
|
||||
"label"
|
||||
],
|
||||
"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"
|
||||
},
|
||||
"brand": {
|
||||
"$ref": "common.schema.json#/$defs/brandMark"
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"minimum": 32
|
||||
},
|
||||
"height": {
|
||||
"type": "number",
|
||||
"minimum": 32
|
||||
},
|
||||
"yOffset": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cards": {
|
||||
"$ref": "common.schema.json#/$defs/cards"
|
||||
}
|
||||
},
|
||||
"$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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user