dataflow.schema.json
254 lines · archify/schemas/dataflow.schema.json at a406594
1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://github.com/tt-a1i/archify/schemas/dataflow.schema.json",
4 "title": "Archify Data Flow Diagram",
5 "type": "object",
6 "additionalProperties": false,
7 "required": [
8 "schema_version",
9 "diagram_type",
10 "meta",
11 "stages",
12 "nodes",
13 "flows"
14 ],
15 "properties": {
16 "schema_version": {
17 "const": 1
18 },
19 "diagram_type": {
20 "const": "dataflow"
21 },
22 "meta": {
23 "type": "object",
24 "additionalProperties": false,
25 "required": [
26 "title",
27 "output"
28 ],
29 "properties": {
30 "title": {
31 "type": "string",
32 "minLength": 1
33 },
34 "locale": {
35 "$ref": "common.schema.json#/$defs/locale"
36 },
37 "translations": {
38 "$ref": "common.schema.json#/$defs/translations"
39 },
40 "subtitle": {
41 "type": "string"
42 },
43 "output": {
44 "$ref": "common.schema.json#/$defs/portableOutputPath"
45 },
46 "animation": {
47 "$ref": "common.schema.json#/$defs/animation"
48 },
49 "visual_preset": {
50 "$ref": "common.schema.json#/$defs/visualPreset"
51 },
52 "quality_profile": {
53 "$ref": "common.schema.json#/$defs/qualityProfile"
54 },
55 "repository": {
56 "$ref": "common.schema.json#/$defs/repository"
57 },
58 "views": {
59 "$ref": "common.schema.json#/$defs/guidedViews"
60 },
61 "legend": {
62 "type": "object",
63 "additionalProperties": false,
64 "properties": {
65 "mode": { "$ref": "common.schema.json#/$defs/legendMode" },
66 "entries": {
67 "type": "object",
68 "additionalProperties": false,
69 "properties": {
70 "default": { "$ref": "common.schema.json#/$defs/legendEntry" },
71 "emphasis": { "$ref": "common.schema.json#/$defs/legendEntry" },
72 "security": { "$ref": "common.schema.json#/$defs/legendEntry" },
73 "dashed": { "$ref": "common.schema.json#/$defs/legendEntry" },
74 "database": { "$ref": "common.schema.json#/$defs/legendEntry" }
75 }
76 }
77 }
78 },
79 "viewBox": {
80 "type": "array",
81 "prefixItems": [
82 {
83 "type": "number",
84 "minimum": 360
85 },
86 {
87 "type": "number",
88 "minimum": 360
89 }
90 ],
91 "items": false,
92 "minItems": 2,
93 "maxItems": 2
94 }
95 }
96 },
97 "stages": {
98 "type": "array",
99 "minItems": 2,
100 "maxItems": 5,
101 "items": {
102 "type": "object",
103 "additionalProperties": false,
104 "required": [
105 "label"
106 ],
107 "properties": {
108 "label": {
109 "type": "string",
110 "minLength": 1
111 }
112 }
113 }
114 },
115 "nodes": {
116 "type": "array",
117 "minItems": 2,
118 "items": {
119 "type": "object",
120 "additionalProperties": false,
121 "required": [
122 "id",
123 "type",
124 "label",
125 "stage",
126 "row"
127 ],
128 "properties": {
129 "id": {
130 "$ref": "common.schema.json#/$defs/id"
131 },
132 "type": {
133 "$ref": "common.schema.json#/$defs/componentType"
134 },
135 "label": {
136 "type": "string",
137 "minLength": 1
138 },
139 "sublabel": {
140 "type": "string"
141 },
142 "tag": {
143 "type": "string"
144 },
145 "icon": { "$ref": "common.schema.json#/$defs/nodeIcon" },
146 "brand": {
147 "$ref": "common.schema.json#/$defs/brandMark"
148 },
149 "sources": {
150 "$ref": "common.schema.json#/$defs/sourceReferences"
151 },
152 "stage": {
153 "type": "integer",
154 "minimum": 0
155 },
156 "row": {
157 "type": "integer",
158 "minimum": 0
159 },
160 "width": {
161 "type": "number",
162 "minimum": 48
163 },
164 "height": {
165 "type": "number",
166 "minimum": 36
167 },
168 "yOffset": {
169 "type": "number"
170 }
171 }
172 }
173 },
174 "flows": {
175 "type": "array",
176 "items": {
177 "type": "object",
178 "additionalProperties": false,
179 "required": [
180 "from",
181 "to",
182 "label"
183 ],
184 "properties": {
185 "id": {
186 "$ref": "common.schema.json#/$defs/id"
187 },
188 "from": {
189 "$ref": "common.schema.json#/$defs/id"
190 },
191 "to": {
192 "$ref": "common.schema.json#/$defs/id"
193 },
194 "label": {
195 "type": "string",
196 "minLength": 1
197 },
198 "classification": {
199 "type": "string"
200 },
201 "variant": {
202 "$ref": "common.schema.json#/$defs/variant"
203 },
204 "route": {
205 "enum": [
206 "auto",
207 "straight",
208 "vertical-channel",
209 "bottom-channel",
210 "top-channel"
211 ]
212 },
213 "fromSide": {
214 "$ref": "common.schema.json#/$defs/side"
215 },
216 "toSide": {
217 "$ref": "common.schema.json#/$defs/side"
218 },
219 "channelX": {
220 "type": "number"
221 },
222 "channelY": {
223 "type": "number"
224 },
225 "labelAt": {
226 "$ref": "common.schema.json#/$defs/point"
227 },
228 "labelDx": {
229 "type": "number"
230 },
231 "labelDy": {
232 "type": "number"
233 },
234 "labelSegment": {
235 "type": "integer",
236 "minimum": 0
237 },
238 "via": {
239 "type": "array",
240 "items": {
241 "$ref": "common.schema.json#/$defs/point"
242 }
243 },
244 "width": {
245 "$ref": "common.schema.json#/$defs/relationshipWidth"
246 }
247 }
248 }
249 },
250 "cards": {
251 "$ref": "common.schema.json#/$defs/cards"
252 }
253 }
254}