@openplanr/protocol 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,435 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-document.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "diagram-document",
6
+ "version": "1.13.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "planr-diagram"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "protocolVersion": {
18
+ "const": "1.13.0"
19
+ },
20
+ "diagramId": {
21
+ "type": "string",
22
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
23
+ "minLength": 1,
24
+ "maxLength": 128
25
+ },
26
+ "title": {
27
+ "type": "string",
28
+ "minLength": 0,
29
+ "maxLength": 4096
30
+ },
31
+ "summary": {
32
+ "type": "string",
33
+ "minLength": 0,
34
+ "maxLength": 4096
35
+ },
36
+ "audience": {
37
+ "enum": [
38
+ "engineer",
39
+ "executive",
40
+ "mixed"
41
+ ]
42
+ },
43
+ "grammar": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "properties": {
47
+ "id": {
48
+ "enum": [
49
+ "flowchart",
50
+ "process",
51
+ "swimlane",
52
+ "architecture"
53
+ ]
54
+ },
55
+ "version": {
56
+ "const": "1.0.0"
57
+ }
58
+ },
59
+ "required": [
60
+ "id",
61
+ "version"
62
+ ]
63
+ },
64
+ "nodes": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "properties": {
70
+ "id": {
71
+ "type": "string",
72
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
73
+ "minLength": 1,
74
+ "maxLength": 128
75
+ },
76
+ "label": {
77
+ "type": "string",
78
+ "minLength": 0,
79
+ "maxLength": 4096
80
+ },
81
+ "kind": {
82
+ "enum": [
83
+ "process",
84
+ "start",
85
+ "end",
86
+ "decision",
87
+ "data-store",
88
+ "component"
89
+ ]
90
+ },
91
+ "description": {
92
+ "anyOf": [
93
+ {
94
+ "type": "null"
95
+ },
96
+ {
97
+ "type": "string",
98
+ "minLength": 0,
99
+ "maxLength": 4096
100
+ }
101
+ ]
102
+ }
103
+ },
104
+ "required": [
105
+ "id",
106
+ "label",
107
+ "kind",
108
+ "description"
109
+ ]
110
+ },
111
+ "minItems": 0,
112
+ "maxItems": 4096
113
+ },
114
+ "relations": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "properties": {
120
+ "id": {
121
+ "type": "string",
122
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
123
+ "minLength": 1,
124
+ "maxLength": 128
125
+ },
126
+ "from": {
127
+ "type": "string",
128
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
129
+ "minLength": 1,
130
+ "maxLength": 128
131
+ },
132
+ "to": {
133
+ "type": "string",
134
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
135
+ "minLength": 1,
136
+ "maxLength": 128
137
+ },
138
+ "kind": {
139
+ "enum": [
140
+ "association",
141
+ "dependency",
142
+ "flow",
143
+ "message",
144
+ "transition"
145
+ ]
146
+ },
147
+ "direction": {
148
+ "enum": [
149
+ "forward",
150
+ "both",
151
+ "none"
152
+ ]
153
+ },
154
+ "label": {
155
+ "anyOf": [
156
+ {
157
+ "type": "null"
158
+ },
159
+ {
160
+ "type": "string",
161
+ "minLength": 0,
162
+ "maxLength": 4096
163
+ }
164
+ ]
165
+ },
166
+ "weight": {
167
+ "anyOf": [
168
+ {
169
+ "type": "null"
170
+ },
171
+ {
172
+ "type": "number",
173
+ "minimum": 0,
174
+ "maximum": 1000000
175
+ }
176
+ ]
177
+ }
178
+ },
179
+ "required": [
180
+ "id",
181
+ "from",
182
+ "to",
183
+ "kind",
184
+ "direction",
185
+ "label",
186
+ "weight"
187
+ ]
188
+ },
189
+ "minItems": 0,
190
+ "maxItems": 8192
191
+ },
192
+ "groups": {
193
+ "type": "array",
194
+ "items": {
195
+ "type": "object",
196
+ "additionalProperties": false,
197
+ "properties": {
198
+ "id": {
199
+ "type": "string",
200
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
201
+ "minLength": 1,
202
+ "maxLength": 128
203
+ },
204
+ "label": {
205
+ "type": "string",
206
+ "minLength": 0,
207
+ "maxLength": 4096
208
+ },
209
+ "members": {
210
+ "type": "array",
211
+ "items": {
212
+ "type": "string",
213
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
214
+ "minLength": 1,
215
+ "maxLength": 128
216
+ },
217
+ "minItems": 0,
218
+ "maxItems": 10000,
219
+ "uniqueItems": true
220
+ }
221
+ },
222
+ "required": [
223
+ "id",
224
+ "label",
225
+ "members"
226
+ ]
227
+ },
228
+ "minItems": 0,
229
+ "maxItems": 1024
230
+ },
231
+ "lanes": {
232
+ "type": "array",
233
+ "items": {
234
+ "type": "object",
235
+ "additionalProperties": false,
236
+ "properties": {
237
+ "id": {
238
+ "type": "string",
239
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
240
+ "minLength": 1,
241
+ "maxLength": 128
242
+ },
243
+ "label": {
244
+ "type": "string",
245
+ "minLength": 0,
246
+ "maxLength": 4096
247
+ },
248
+ "members": {
249
+ "type": "array",
250
+ "items": {
251
+ "type": "string",
252
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
253
+ "minLength": 1,
254
+ "maxLength": 128
255
+ },
256
+ "minItems": 0,
257
+ "maxItems": 10000,
258
+ "uniqueItems": true
259
+ }
260
+ },
261
+ "required": [
262
+ "id",
263
+ "label",
264
+ "members"
265
+ ]
266
+ },
267
+ "minItems": 0,
268
+ "maxItems": 256
269
+ },
270
+ "events": {
271
+ "type": "array",
272
+ "items": false,
273
+ "minItems": 0,
274
+ "maxItems": 0
275
+ },
276
+ "series": {
277
+ "type": "array",
278
+ "items": false,
279
+ "minItems": 0,
280
+ "maxItems": 0
281
+ },
282
+ "axes": {
283
+ "type": "array",
284
+ "items": false,
285
+ "minItems": 0,
286
+ "maxItems": 0
287
+ },
288
+ "sets": {
289
+ "type": "array",
290
+ "items": false,
291
+ "minItems": 0,
292
+ "maxItems": 0
293
+ },
294
+ "annotations": {
295
+ "type": "array",
296
+ "items": {
297
+ "type": "object",
298
+ "additionalProperties": false,
299
+ "properties": {
300
+ "id": {
301
+ "type": "string",
302
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
303
+ "minLength": 1,
304
+ "maxLength": 128
305
+ },
306
+ "text": {
307
+ "type": "string",
308
+ "minLength": 0,
309
+ "maxLength": 4096
310
+ },
311
+ "targetId": {
312
+ "anyOf": [
313
+ {
314
+ "type": "null"
315
+ },
316
+ {
317
+ "type": "string",
318
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
319
+ "minLength": 1,
320
+ "maxLength": 128
321
+ }
322
+ ]
323
+ }
324
+ },
325
+ "required": [
326
+ "id",
327
+ "text",
328
+ "targetId"
329
+ ]
330
+ },
331
+ "minItems": 0,
332
+ "maxItems": 1024
333
+ },
334
+ "emphasis": {
335
+ "type": "array",
336
+ "items": {
337
+ "type": "object",
338
+ "additionalProperties": false,
339
+ "properties": {
340
+ "targetId": {
341
+ "type": "string",
342
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
343
+ "minLength": 1,
344
+ "maxLength": 128
345
+ },
346
+ "level": {
347
+ "enum": [
348
+ "primary",
349
+ "secondary",
350
+ "muted"
351
+ ]
352
+ }
353
+ },
354
+ "required": [
355
+ "targetId",
356
+ "level"
357
+ ]
358
+ },
359
+ "minItems": 0,
360
+ "maxItems": 1024
361
+ },
362
+ "laneOrder": {
363
+ "type": "array",
364
+ "items": {
365
+ "type": "string",
366
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
367
+ "minLength": 1,
368
+ "maxLength": 128
369
+ },
370
+ "minItems": 0,
371
+ "maxItems": 10000,
372
+ "uniqueItems": true
373
+ },
374
+ "accessibility": {
375
+ "type": "object",
376
+ "additionalProperties": false,
377
+ "properties": {
378
+ "title": {
379
+ "type": "string",
380
+ "minLength": 0,
381
+ "maxLength": 4096
382
+ },
383
+ "description": {
384
+ "type": "string",
385
+ "minLength": 0,
386
+ "maxLength": 4096
387
+ },
388
+ "readingOrder": {
389
+ "type": "array",
390
+ "items": {
391
+ "type": "string",
392
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
393
+ "minLength": 1,
394
+ "maxLength": 128
395
+ },
396
+ "minItems": 0,
397
+ "maxItems": 10000,
398
+ "uniqueItems": true
399
+ }
400
+ },
401
+ "required": [
402
+ "title",
403
+ "description",
404
+ "readingOrder"
405
+ ]
406
+ },
407
+ "documentDigest": {
408
+ "type": "string",
409
+ "pattern": "^sha256:[a-f0-9]{64}$"
410
+ }
411
+ },
412
+ "required": [
413
+ "kind",
414
+ "schemaVersion",
415
+ "protocolVersion",
416
+ "diagramId",
417
+ "title",
418
+ "summary",
419
+ "audience",
420
+ "grammar",
421
+ "nodes",
422
+ "relations",
423
+ "groups",
424
+ "lanes",
425
+ "events",
426
+ "series",
427
+ "axes",
428
+ "sets",
429
+ "annotations",
430
+ "emphasis",
431
+ "laneOrder",
432
+ "accessibility",
433
+ "documentDigest"
434
+ ]
435
+ }