lifecycle.schema.json
179 lines · archify/schemas/lifecycle.schema.json at a406594
1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://github.com/tt-a1i/archify/schemas/lifecycle.schema.json",
4 "title": "Archify Lifecycle Diagram",
5 "type": "object",
6 "additionalProperties": false,
7 "required": [
8 "schema_version",
9 "diagram_type",
10 "meta",
11 "mainPath",
12 "states",
13 "transitions"
14 ],
15 "properties": {
16 "schema_version": {
17 "description": "Lifecycle uses version 3: an automatic main-path layout.",
18 "const": 3
19 },
20 "diagram_type": {
21 "const": "lifecycle"
22 },
23 "meta": {
24 "type": "object",
25 "additionalProperties": false,
26 "required": [
27 "title",
28 "output"
29 ],
30 "properties": {
31 "title": {
32 "type": "string",
33 "minLength": 1
34 },
35 "locale": {
36 "$ref": "common.schema.json#/$defs/locale"
37 },
38 "translations": {
39 "$ref": "common.schema.json#/$defs/translations"
40 },
41 "subtitle": {
42 "type": "string"
43 },
44 "output": {
45 "$ref": "common.schema.json#/$defs/portableOutputPath"
46 },
47 "animation": {
48 "$ref": "common.schema.json#/$defs/animation"
49 },
50 "visual_preset": {
51 "$ref": "common.schema.json#/$defs/visualPreset"
52 },
53 "quality_profile": {
54 "$ref": "common.schema.json#/$defs/qualityProfile"
55 },
56 "repository": {
57 "$ref": "common.schema.json#/$defs/repository"
58 },
59 "views": {
60 "$ref": "common.schema.json#/$defs/guidedViews"
61 },
62 "legend": {
63 "type": "object",
64 "additionalProperties": false,
65 "properties": {
66 "mode": { "$ref": "common.schema.json#/$defs/legendMode" },
67 "entries": {
68 "type": "object",
69 "additionalProperties": false,
70 "properties": {
71 "start": { "$ref": "common.schema.json#/$defs/legendEntry" },
72 "active": { "$ref": "common.schema.json#/$defs/legendEntry" },
73 "waiting": { "$ref": "common.schema.json#/$defs/legendEntry" },
74 "decision": { "$ref": "common.schema.json#/$defs/legendEntry" },
75 "success": { "$ref": "common.schema.json#/$defs/legendEntry" },
76 "failure": { "$ref": "common.schema.json#/$defs/legendEntry" },
77 "neutral": { "$ref": "common.schema.json#/$defs/legendEntry" },
78 "external": { "$ref": "common.schema.json#/$defs/legendEntry" }
79 }
80 }
81 }
82 }
83 }
84 },
85 "mainPath": {
86 "description": "The happy path from the initial state, left to right. Each consecutive pair needs a transition. Every other state is placed below the state it branches from; transitions back to an earlier main-path state are drawn as loops above.",
87 "type": "array",
88 "minItems": 2,
89 "items": {
90 "$ref": "common.schema.json#/$defs/id"
91 }
92 },
93 "states": {
94 "type": "array",
95 "minItems": 2,
96 "items": {
97 "type": "object",
98 "additionalProperties": false,
99 "required": [
100 "id",
101 "type",
102 "label"
103 ],
104 "properties": {
105 "id": {
106 "$ref": "common.schema.json#/$defs/id"
107 },
108 "type": {
109 "description": "start: the initial state. active: work in progress. waiting: paused for a person, time, or input. decision: a review or branch point (Mermaid <<choice>>). success / failure: a good or bad outcome. neutral: parked, or ended without success or failure. external: handled by an outside party. Color and the default corner sigil follow the type.",
110 "enum": [
111 "start",
112 "active",
113 "waiting",
114 "decision",
115 "success",
116 "failure",
117 "neutral",
118 "external"
119 ]
120 },
121 "label": {
122 "type": "string",
123 "minLength": 1
124 },
125 "sublabel": {
126 "type": "string"
127 },
128 "tag": {
129 "type": "string"
130 },
131 "icon": { "$ref": "common.schema.json#/$defs/nodeIcon" },
132 "brand": {
133 "$ref": "common.schema.json#/$defs/brandMark"
134 },
135 "sources": {
136 "$ref": "common.schema.json#/$defs/sourceReferences"
137 },
138 "step": {
139 "type": "string"
140 }
141 }
142 }
143 },
144 "transitions": {
145 "type": "array",
146 "items": {
147 "type": "object",
148 "additionalProperties": false,
149 "required": [
150 "from",
151 "to"
152 ],
153 "properties": {
154 "id": {
155 "$ref": "common.schema.json#/$defs/id"
156 },
157 "from": {
158 "$ref": "common.schema.json#/$defs/id"
159 },
160 "to": {
161 "$ref": "common.schema.json#/$defs/id"
162 },
163 "label": {
164 "type": "string"
165 },
166 "note": {
167 "type": "string"
168 },
169 "variant": {
170 "$ref": "common.schema.json#/$defs/variant"
171 }
172 }
173 }
174 },
175 "cards": {
176 "$ref": "common.schema.json#/$defs/cards"
177 }
178 }
179}