@graph-ir/core 0.2.1 → 0.2.2

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.
@@ -1,160 +1,439 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://graph-ir.dev/schemas/2.0/graph-ir.schema.json",
3
+ "$id": "https://graph-ir.dev/schemas/3.0/graph-ir.schema.json",
4
4
  "title": "GraphIR authored graph",
5
- "description": "Canonical authored GraphIR schema 2.0.0",
5
+ "description": "Canonical authored GraphIR schema 3.0.0",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
- "required": ["version", "id", "nodes", "edges"],
8
+ "required": [
9
+ "version",
10
+ "id",
11
+ "nodes",
12
+ "edges"
13
+ ],
9
14
  "properties": {
10
- "version": { "const": "2.0.0" },
11
- "id": { "$ref": "#/$defs/Identifier" },
12
- "name": { "type": "string" },
13
- "nodes": { "type": "array", "items": { "$ref": "#/$defs/GraphNode" } },
14
- "edges": { "type": "array", "items": { "$ref": "#/$defs/GraphEdge" } },
15
+ "version": {
16
+ "const": "3.0.0"
17
+ },
18
+ "id": {
19
+ "$ref": "#/$defs/Identifier"
20
+ },
21
+ "name": {
22
+ "type": "string"
23
+ },
24
+ "nodes": {
25
+ "type": "array",
26
+ "items": {
27
+ "$ref": "#/$defs/GraphNode"
28
+ }
29
+ },
30
+ "edges": {
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "#/$defs/GraphEdge"
34
+ }
35
+ },
15
36
  "constraints": {
16
37
  "type": "array",
17
- "items": { "$ref": "#/$defs/SpatialConstraint" }
38
+ "items": {
39
+ "$ref": "#/$defs/SpatialConstraint"
40
+ }
41
+ },
42
+ "metadata": {
43
+ "$ref": "#/$defs/GraphMetadata"
18
44
  },
19
- "metadata": { "$ref": "#/$defs/GraphMetadata" },
20
- "layoutOptions": { "$ref": "#/$defs/LayoutOptions" }
45
+ "layoutOptions": {
46
+ "$ref": "#/$defs/LayoutOptions"
47
+ },
48
+ "profile": {
49
+ "$ref": "#/$defs/NotationProfile"
50
+ },
51
+ "interaction": {
52
+ "$ref": "#/$defs/Interaction"
53
+ }
21
54
  },
22
55
  "$defs": {
23
- "Identifier": { "type": "string", "minLength": 1 },
56
+ "Identifier": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
24
60
  "Position": {
25
61
  "type": "object",
26
62
  "additionalProperties": false,
27
- "required": ["x", "y"],
28
- "properties": { "x": { "type": "number" }, "y": { "type": "number" } }
63
+ "required": [
64
+ "x",
65
+ "y"
66
+ ],
67
+ "properties": {
68
+ "x": {
69
+ "type": "number"
70
+ },
71
+ "y": {
72
+ "type": "number"
73
+ }
74
+ }
29
75
  },
30
76
  "Dimensions": {
31
77
  "type": "object",
32
78
  "additionalProperties": false,
33
- "required": ["width", "height"],
79
+ "required": [
80
+ "width",
81
+ "height"
82
+ ],
34
83
  "properties": {
35
- "width": { "type": "number", "minimum": 0 },
36
- "height": { "type": "number", "minimum": 0 }
84
+ "width": {
85
+ "type": "number",
86
+ "minimum": 0
87
+ },
88
+ "height": {
89
+ "type": "number",
90
+ "minimum": 0
91
+ }
37
92
  }
38
93
  },
39
94
  "PlacementSide": {
40
95
  "type": "string",
41
- "enum": ["above", "below", "left", "right", "center"]
96
+ "enum": [
97
+ "above",
98
+ "below",
99
+ "left",
100
+ "right",
101
+ "center"
102
+ ]
42
103
  },
43
104
  "NodeLabelPlacement": {
44
105
  "type": "object",
45
106
  "additionalProperties": false,
46
- "required": ["side"],
107
+ "required": [
108
+ "side"
109
+ ],
47
110
  "properties": {
48
- "side": { "$ref": "#/$defs/PlacementSide" },
49
- "offset": { "type": "number", "minimum": 0, "default": 0 }
111
+ "side": {
112
+ "$ref": "#/$defs/PlacementSide"
113
+ },
114
+ "offset": {
115
+ "type": "number",
116
+ "minimum": 0,
117
+ "default": 0
118
+ }
50
119
  },
51
120
  "allOf": [
52
121
  {
53
- "if": { "properties": { "side": { "const": "center" } }, "required": ["side"] },
54
- "then": { "properties": { "offset": { "const": 0 } } }
122
+ "if": {
123
+ "properties": {
124
+ "side": {
125
+ "const": "center"
126
+ }
127
+ },
128
+ "required": [
129
+ "side"
130
+ ]
131
+ },
132
+ "then": {
133
+ "properties": {
134
+ "offset": {
135
+ "const": 0
136
+ }
137
+ }
138
+ }
55
139
  }
56
140
  ]
57
141
  },
58
142
  "EdgeLabelPlacement": {
59
143
  "type": "object",
60
144
  "additionalProperties": false,
61
- "required": ["side"],
145
+ "required": [
146
+ "side"
147
+ ],
62
148
  "properties": {
63
- "side": { "$ref": "#/$defs/PlacementSide" },
64
- "at": { "type": "number", "minimum": 0, "maximum": 1, "default": 0.5 },
65
- "offset": { "type": "number", "minimum": 0, "default": 0 }
149
+ "side": {
150
+ "$ref": "#/$defs/PlacementSide"
151
+ },
152
+ "at": {
153
+ "type": "number",
154
+ "minimum": 0,
155
+ "maximum": 1,
156
+ "default": 0.5
157
+ },
158
+ "offset": {
159
+ "type": "number",
160
+ "minimum": 0,
161
+ "default": 0
162
+ }
66
163
  },
67
164
  "allOf": [
68
165
  {
69
- "if": { "properties": { "side": { "const": "center" } }, "required": ["side"] },
70
- "then": { "properties": { "offset": { "const": 0 } } }
166
+ "if": {
167
+ "properties": {
168
+ "side": {
169
+ "const": "center"
170
+ }
171
+ },
172
+ "required": [
173
+ "side"
174
+ ]
175
+ },
176
+ "then": {
177
+ "properties": {
178
+ "offset": {
179
+ "const": 0
180
+ }
181
+ }
182
+ }
71
183
  }
72
184
  ]
73
185
  },
74
186
  "Port": {
75
187
  "type": "object",
76
188
  "additionalProperties": false,
77
- "required": ["id", "side"],
189
+ "required": [
190
+ "id",
191
+ "side"
192
+ ],
78
193
  "properties": {
79
- "id": { "$ref": "#/$defs/Identifier" },
80
- "side": { "type": "string", "enum": ["NORTH", "SOUTH", "EAST", "WEST"] },
81
- "label": { "type": "string" },
82
- "position": { "type": "number", "minimum": 0, "maximum": 1 },
83
- "properties": { "type": "object", "additionalProperties": true }
194
+ "id": {
195
+ "$ref": "#/$defs/Identifier"
196
+ },
197
+ "side": {
198
+ "type": "string",
199
+ "enum": [
200
+ "NORTH",
201
+ "SOUTH",
202
+ "EAST",
203
+ "WEST"
204
+ ]
205
+ },
206
+ "label": {
207
+ "type": "string"
208
+ },
209
+ "position": {
210
+ "type": "number",
211
+ "minimum": 0,
212
+ "maximum": 1
213
+ },
214
+ "properties": {
215
+ "type": "object",
216
+ "additionalProperties": true
217
+ }
84
218
  }
85
219
  },
86
220
  "Padding": {
87
221
  "type": "object",
88
222
  "additionalProperties": false,
89
223
  "properties": {
90
- "top": { "type": "number", "minimum": 0, "default": 0 },
91
- "right": { "type": "number", "minimum": 0, "default": 0 },
92
- "bottom": { "type": "number", "minimum": 0, "default": 0 },
93
- "left": { "type": "number", "minimum": 0, "default": 0 }
224
+ "top": {
225
+ "type": "number",
226
+ "minimum": 0,
227
+ "default": 0
228
+ },
229
+ "right": {
230
+ "type": "number",
231
+ "minimum": 0,
232
+ "default": 0
233
+ },
234
+ "bottom": {
235
+ "type": "number",
236
+ "minimum": 0,
237
+ "default": 0
238
+ },
239
+ "left": {
240
+ "type": "number",
241
+ "minimum": 0,
242
+ "default": 0
243
+ }
94
244
  }
95
245
  },
96
246
  "SpacingOptions": {
97
247
  "type": "object",
98
248
  "additionalProperties": false,
99
249
  "properties": {
100
- "nodeNode": { "type": "number", "minimum": 0 },
101
- "nodeEdge": { "type": "number", "minimum": 0 },
102
- "edgeEdge": { "type": "number", "minimum": 0 },
103
- "layerSpacing": { "type": "number", "minimum": 0 }
250
+ "nodeNode": {
251
+ "type": "number",
252
+ "minimum": 0
253
+ },
254
+ "nodeEdge": {
255
+ "type": "number",
256
+ "minimum": 0
257
+ },
258
+ "edgeEdge": {
259
+ "type": "number",
260
+ "minimum": 0
261
+ },
262
+ "layerSpacing": {
263
+ "type": "number",
264
+ "minimum": 0
265
+ }
104
266
  }
105
267
  },
106
268
  "LayoutOptions": {
107
269
  "type": "object",
108
270
  "additionalProperties": false,
109
271
  "properties": {
110
- "algorithm": { "type": "string", "enum": ["layered", "force", "radial", "tree", "fixed"] },
111
- "direction": { "type": "string", "enum": ["DOWN", "UP", "LEFT", "RIGHT"] },
112
- "spacing": { "$ref": "#/$defs/SpacingOptions" },
113
- "edgeRouting": { "type": "string", "enum": ["orthogonal", "polyline", "spline"] },
114
- "hierarchyHandling": { "type": "string", "enum": ["INCLUDE_CHILDREN", "SEPARATE_CHILDREN"] }
272
+ "algorithm": {
273
+ "type": "string",
274
+ "enum": [
275
+ "layered",
276
+ "force",
277
+ "radial",
278
+ "tree",
279
+ "fixed"
280
+ ]
281
+ },
282
+ "direction": {
283
+ "type": "string",
284
+ "enum": [
285
+ "DOWN",
286
+ "UP",
287
+ "LEFT",
288
+ "RIGHT"
289
+ ]
290
+ },
291
+ "spacing": {
292
+ "$ref": "#/$defs/SpacingOptions"
293
+ },
294
+ "edgeRouting": {
295
+ "type": "string",
296
+ "enum": [
297
+ "orthogonal",
298
+ "polyline",
299
+ "spline"
300
+ ]
301
+ },
302
+ "hierarchyHandling": {
303
+ "type": "string",
304
+ "enum": [
305
+ "INCLUDE_CHILDREN",
306
+ "SEPARATE_CHILDREN"
307
+ ]
308
+ }
115
309
  }
116
310
  },
117
311
  "NodeLayoutOptions": {
118
312
  "type": "object",
119
313
  "additionalProperties": false,
120
314
  "properties": {
121
- "portConstraints": { "type": "string", "enum": ["FREE", "FIXED_SIDE", "FIXED_ORDER", "FIXED_POS"] },
122
- "portAlignment": { "type": "string", "enum": ["BEGIN", "CENTER", "END", "JUSTIFIED"] },
315
+ "portConstraints": {
316
+ "type": "string",
317
+ "enum": [
318
+ "FREE",
319
+ "FIXED_SIDE",
320
+ "FIXED_ORDER",
321
+ "FIXED_POS"
322
+ ]
323
+ },
324
+ "portAlignment": {
325
+ "type": "string",
326
+ "enum": [
327
+ "BEGIN",
328
+ "CENTER",
329
+ "END",
330
+ "JUSTIFIED"
331
+ ]
332
+ },
123
333
  "sizeConstraints": {
124
334
  "type": "array",
125
- "items": { "type": "string", "enum": ["MINIMUM_SIZE", "NODE_LABELS", "PORTS"] },
335
+ "items": {
336
+ "type": "string",
337
+ "enum": [
338
+ "MINIMUM_SIZE",
339
+ "NODE_LABELS",
340
+ "PORTS"
341
+ ]
342
+ },
126
343
  "uniqueItems": true
127
344
  },
128
- "minimumSize": { "$ref": "#/$defs/Dimensions" },
129
- "padding": { "$ref": "#/$defs/Padding" }
345
+ "minimumSize": {
346
+ "$ref": "#/$defs/Dimensions"
347
+ },
348
+ "padding": {
349
+ "$ref": "#/$defs/Padding"
350
+ }
130
351
  }
131
352
  },
132
353
  "GraphNode": {
133
354
  "type": "object",
134
355
  "additionalProperties": false,
135
- "required": ["id", "type"],
136
- "properties": {
137
- "id": { "$ref": "#/$defs/Identifier" },
138
- "type": { "$ref": "#/$defs/Identifier" },
139
- "label": { "type": "string" },
140
- "description": { "type": "string" },
141
- "symbol": { "type": "string" },
142
- "variant": { "type": "string" },
143
- "properties": { "type": "object", "additionalProperties": true },
144
- "children": { "type": "array", "items": { "$ref": "#/$defs/GraphNode" } },
145
- "parent": { "$ref": "#/$defs/Identifier" },
146
- "ports": { "type": "array", "items": { "$ref": "#/$defs/Port" } },
147
- "dimensions": { "$ref": "#/$defs/Dimensions" },
148
- "position": { "$ref": "#/$defs/Position" },
149
- "pinned": { "type": "boolean" },
150
- "labelPlacement": { "$ref": "#/$defs/NodeLabelPlacement" },
151
- "layoutOptions": { "$ref": "#/$defs/NodeLayoutOptions" },
152
- "sourceInfo": { "$ref": "#/$defs/SourceInfo" }
356
+ "required": [
357
+ "id",
358
+ "type"
359
+ ],
360
+ "properties": {
361
+ "id": {
362
+ "$ref": "#/$defs/Identifier"
363
+ },
364
+ "type": {
365
+ "$ref": "#/$defs/Identifier"
366
+ },
367
+ "label": {
368
+ "type": "string"
369
+ },
370
+ "description": {
371
+ "type": "string"
372
+ },
373
+ "symbol": {
374
+ "type": "string"
375
+ },
376
+ "variant": {
377
+ "type": "string"
378
+ },
379
+ "properties": {
380
+ "type": "object",
381
+ "additionalProperties": true
382
+ },
383
+ "children": {
384
+ "type": "array",
385
+ "items": {
386
+ "$ref": "#/$defs/GraphNode"
387
+ }
388
+ },
389
+ "parent": {
390
+ "$ref": "#/$defs/Identifier"
391
+ },
392
+ "ports": {
393
+ "type": "array",
394
+ "items": {
395
+ "$ref": "#/$defs/Port"
396
+ }
397
+ },
398
+ "dimensions": {
399
+ "$ref": "#/$defs/Dimensions"
400
+ },
401
+ "position": {
402
+ "$ref": "#/$defs/Position"
403
+ },
404
+ "pinned": {
405
+ "type": "boolean"
406
+ },
407
+ "labelPlacement": {
408
+ "$ref": "#/$defs/NodeLabelPlacement"
409
+ },
410
+ "layoutOptions": {
411
+ "$ref": "#/$defs/NodeLayoutOptions"
412
+ },
413
+ "sourceInfo": {
414
+ "$ref": "#/$defs/SourceInfo"
415
+ },
416
+ "classifier": {
417
+ "$ref": "#/$defs/Classifier"
418
+ }
153
419
  },
154
420
  "allOf": [
155
421
  {
156
- "if": { "properties": { "pinned": { "const": true } }, "required": ["pinned"] },
157
- "then": { "required": ["position"] }
422
+ "if": {
423
+ "properties": {
424
+ "pinned": {
425
+ "const": true
426
+ }
427
+ },
428
+ "required": [
429
+ "pinned"
430
+ ]
431
+ },
432
+ "then": {
433
+ "required": [
434
+ "position"
435
+ ]
436
+ }
158
437
  }
159
438
  ]
160
439
  },
@@ -162,10 +441,22 @@
162
441
  "type": "object",
163
442
  "additionalProperties": false,
164
443
  "properties": {
165
- "lineStyle": { "type": "string", "enum": ["solid", "dashed", "dotted"] },
166
- "targetArrow": { "type": "string", "enum": ["arrow", "diamond", "circle", "none"] },
167
- "sourceArrow": { "type": "string", "enum": ["arrow", "diamond", "circle", "none"] },
168
- "routing": { "type": "string", "enum": ["orthogonal", "polyline", "spline"] }
444
+ "lineStyle": {
445
+ "type": "string",
446
+ "enum": [
447
+ "solid",
448
+ "dashed",
449
+ "dotted"
450
+ ]
451
+ },
452
+ "routing": {
453
+ "type": "string",
454
+ "enum": [
455
+ "orthogonal",
456
+ "polyline",
457
+ "spline"
458
+ ]
459
+ }
169
460
  }
170
461
  },
171
462
  "RouteAnchor": {
@@ -173,29 +464,61 @@
173
464
  {
174
465
  "type": "object",
175
466
  "additionalProperties": false,
176
- "required": ["kind"],
177
- "properties": { "kind": { "const": "source" } }
467
+ "required": [
468
+ "kind"
469
+ ],
470
+ "properties": {
471
+ "kind": {
472
+ "const": "source"
473
+ }
474
+ }
178
475
  },
179
476
  {
180
477
  "type": "object",
181
478
  "additionalProperties": false,
182
- "required": ["kind"],
183
- "properties": { "kind": { "const": "target" } }
479
+ "required": [
480
+ "kind"
481
+ ],
482
+ "properties": {
483
+ "kind": {
484
+ "const": "target"
485
+ }
486
+ }
184
487
  },
185
488
  {
186
489
  "type": "object",
187
490
  "additionalProperties": false,
188
- "required": ["kind", "nodeId"],
189
- "properties": { "kind": { "const": "node" }, "nodeId": { "$ref": "#/$defs/Identifier" } }
491
+ "required": [
492
+ "kind",
493
+ "nodeId"
494
+ ],
495
+ "properties": {
496
+ "kind": {
497
+ "const": "node"
498
+ },
499
+ "nodeId": {
500
+ "$ref": "#/$defs/Identifier"
501
+ }
502
+ }
190
503
  },
191
504
  {
192
505
  "type": "object",
193
506
  "additionalProperties": false,
194
- "required": ["kind", "nodeId", "portId"],
507
+ "required": [
508
+ "kind",
509
+ "nodeId",
510
+ "portId"
511
+ ],
195
512
  "properties": {
196
- "kind": { "const": "port" },
197
- "nodeId": { "$ref": "#/$defs/Identifier" },
198
- "portId": { "$ref": "#/$defs/Identifier" }
513
+ "kind": {
514
+ "const": "port"
515
+ },
516
+ "nodeId": {
517
+ "$ref": "#/$defs/Identifier"
518
+ },
519
+ "portId": {
520
+ "$ref": "#/$defs/Identifier"
521
+ }
199
522
  }
200
523
  }
201
524
  ]
@@ -205,20 +528,37 @@
205
528
  {
206
529
  "type": "object",
207
530
  "additionalProperties": false,
208
- "required": ["kind", "position"],
531
+ "required": [
532
+ "kind",
533
+ "position"
534
+ ],
209
535
  "properties": {
210
- "kind": { "const": "absolute" },
211
- "position": { "$ref": "#/$defs/Position" }
536
+ "kind": {
537
+ "const": "absolute"
538
+ },
539
+ "position": {
540
+ "$ref": "#/$defs/Position"
541
+ }
212
542
  }
213
543
  },
214
544
  {
215
545
  "type": "object",
216
546
  "additionalProperties": false,
217
- "required": ["kind", "anchor", "offset"],
547
+ "required": [
548
+ "kind",
549
+ "anchor",
550
+ "offset"
551
+ ],
218
552
  "properties": {
219
- "kind": { "const": "relative" },
220
- "anchor": { "$ref": "#/$defs/RouteAnchor" },
221
- "offset": { "$ref": "#/$defs/Position" }
553
+ "kind": {
554
+ "const": "relative"
555
+ },
556
+ "anchor": {
557
+ "$ref": "#/$defs/RouteAnchor"
558
+ },
559
+ "offset": {
560
+ "$ref": "#/$defs/Position"
561
+ }
222
562
  }
223
563
  }
224
564
  ]
@@ -226,51 +566,106 @@
226
566
  "RouteWaypoint": {
227
567
  "type": "object",
228
568
  "additionalProperties": false,
229
- "required": ["id", "placement"],
569
+ "required": [
570
+ "id",
571
+ "placement"
572
+ ],
230
573
  "properties": {
231
- "id": { "$ref": "#/$defs/Identifier" },
232
- "placement": { "$ref": "#/$defs/WaypointPlacement" }
574
+ "id": {
575
+ "$ref": "#/$defs/Identifier"
576
+ },
577
+ "placement": {
578
+ "$ref": "#/$defs/WaypointPlacement"
579
+ }
233
580
  }
234
581
  },
235
582
  "RouteIntent": {
236
583
  "type": "object",
237
584
  "additionalProperties": false,
238
- "required": ["waypoints"],
585
+ "required": [
586
+ "waypoints"
587
+ ],
239
588
  "properties": {
240
589
  "waypoints": {
241
590
  "type": "array",
242
591
  "minItems": 1,
243
- "items": { "$ref": "#/$defs/RouteWaypoint" }
592
+ "items": {
593
+ "$ref": "#/$defs/RouteWaypoint"
594
+ }
244
595
  }
245
596
  }
246
597
  },
247
598
  "GraphEdge": {
248
599
  "type": "object",
249
600
  "additionalProperties": false,
250
- "required": ["id", "source", "target"],
601
+ "required": [
602
+ "id",
603
+ "source",
604
+ "target"
605
+ ],
251
606
  "properties": {
252
- "id": { "$ref": "#/$defs/Identifier" },
253
- "source": { "$ref": "#/$defs/Identifier" },
254
- "target": { "$ref": "#/$defs/Identifier" },
255
- "sourcePort": { "$ref": "#/$defs/Identifier" },
256
- "targetPort": { "$ref": "#/$defs/Identifier" },
257
- "type": { "type": "string" },
258
- "label": { "type": "string" },
259
- "description": { "type": "string" },
260
- "labelPlacement": { "$ref": "#/$defs/EdgeLabelPlacement" },
261
- "routeIntent": { "$ref": "#/$defs/RouteIntent" },
262
- "properties": { "type": "object", "additionalProperties": true },
263
- "style": { "$ref": "#/$defs/EdgeStyle" },
264
- "sourceInfo": { "$ref": "#/$defs/SourceInfo" }
607
+ "id": {
608
+ "$ref": "#/$defs/Identifier"
609
+ },
610
+ "source": {
611
+ "$ref": "#/$defs/Identifier"
612
+ },
613
+ "target": {
614
+ "$ref": "#/$defs/Identifier"
615
+ },
616
+ "sourcePort": {
617
+ "$ref": "#/$defs/Identifier"
618
+ },
619
+ "targetPort": {
620
+ "$ref": "#/$defs/Identifier"
621
+ },
622
+ "type": {
623
+ "type": "string"
624
+ },
625
+ "label": {
626
+ "type": "string"
627
+ },
628
+ "description": {
629
+ "type": "string"
630
+ },
631
+ "labelPlacement": {
632
+ "$ref": "#/$defs/EdgeLabelPlacement"
633
+ },
634
+ "routeIntent": {
635
+ "$ref": "#/$defs/RouteIntent"
636
+ },
637
+ "properties": {
638
+ "type": "object",
639
+ "additionalProperties": true
640
+ },
641
+ "style": {
642
+ "$ref": "#/$defs/EdgeStyle"
643
+ },
644
+ "sourceInfo": {
645
+ "$ref": "#/$defs/SourceInfo"
646
+ },
647
+ "sourceEnd": {
648
+ "$ref": "#/$defs/RelationshipEnd"
649
+ },
650
+ "targetEnd": {
651
+ "$ref": "#/$defs/RelationshipEnd"
652
+ }
265
653
  }
266
654
  },
267
655
  "ConstraintNodeReference": {
268
656
  "type": "object",
269
657
  "additionalProperties": false,
270
- "required": ["kind", "nodeId"],
658
+ "required": [
659
+ "kind",
660
+ "nodeId"
661
+ ],
271
662
  "properties": {
272
- "kind": { "const": "node" },
273
- "nodeId": { "$ref": "#/$defs/Identifier" }
663
+ "kind": {
664
+ "const": "node"
665
+ },
666
+ "nodeId": {
667
+ "$ref": "#/$defs/Identifier"
668
+ }
274
669
  }
275
670
  },
276
671
  "BoundaryScope": {
@@ -278,138 +673,1143 @@
278
673
  {
279
674
  "type": "object",
280
675
  "additionalProperties": false,
281
- "required": ["kind"],
282
- "properties": { "kind": { "const": "graph" } }
676
+ "required": [
677
+ "kind"
678
+ ],
679
+ "properties": {
680
+ "kind": {
681
+ "const": "graph"
682
+ }
683
+ }
283
684
  },
284
685
  {
285
686
  "type": "object",
286
687
  "additionalProperties": false,
287
- "required": ["kind", "nodeId"],
288
- "properties": { "kind": { "const": "node" }, "nodeId": { "$ref": "#/$defs/Identifier" } }
688
+ "required": [
689
+ "kind",
690
+ "nodeId"
691
+ ],
692
+ "properties": {
693
+ "kind": {
694
+ "const": "node"
695
+ },
696
+ "nodeId": {
697
+ "$ref": "#/$defs/Identifier"
698
+ }
699
+ }
289
700
  }
290
701
  ]
291
702
  },
292
703
  "ConstraintBaseProperties": {
293
704
  "type": "object",
294
705
  "properties": {
295
- "id": { "$ref": "#/$defs/Identifier" },
296
- "strength": { "type": "string", "enum": ["required", "preferred"], "default": "required" },
297
- "sourceInfo": { "$ref": "#/$defs/SourceInfo" }
706
+ "id": {
707
+ "$ref": "#/$defs/Identifier"
708
+ },
709
+ "strength": {
710
+ "type": "string",
711
+ "enum": [
712
+ "required",
713
+ "preferred"
714
+ ],
715
+ "default": "required"
716
+ },
717
+ "sourceInfo": {
718
+ "$ref": "#/$defs/SourceInfo"
719
+ }
298
720
  }
299
721
  },
300
722
  "RelativeConstraint": {
301
723
  "type": "object",
302
724
  "additionalProperties": false,
303
- "required": ["id", "kind", "subject", "relation", "target"],
725
+ "required": [
726
+ "id",
727
+ "kind",
728
+ "subject",
729
+ "relation",
730
+ "target"
731
+ ],
304
732
  "properties": {
305
- "id": { "$ref": "#/$defs/Identifier" },
306
- "kind": { "const": "relative" },
307
- "strength": { "type": "string", "enum": ["required", "preferred"], "default": "required" },
308
- "sourceInfo": { "$ref": "#/$defs/SourceInfo" },
309
- "subject": { "$ref": "#/$defs/ConstraintNodeReference" },
310
- "relation": { "type": "string", "enum": ["above", "below", "left-of", "right-of"] },
311
- "target": { "$ref": "#/$defs/ConstraintNodeReference" },
312
- "gap": { "type": "number", "minimum": 0, "default": 0 },
313
- "alignment": { "type": "string", "enum": ["start", "center", "end"], "default": "center" }
733
+ "id": {
734
+ "$ref": "#/$defs/Identifier"
735
+ },
736
+ "kind": {
737
+ "const": "relative"
738
+ },
739
+ "strength": {
740
+ "type": "string",
741
+ "enum": [
742
+ "required",
743
+ "preferred"
744
+ ],
745
+ "default": "required"
746
+ },
747
+ "sourceInfo": {
748
+ "$ref": "#/$defs/SourceInfo"
749
+ },
750
+ "subject": {
751
+ "$ref": "#/$defs/ConstraintNodeReference"
752
+ },
753
+ "relation": {
754
+ "type": "string",
755
+ "enum": [
756
+ "above",
757
+ "below",
758
+ "left-of",
759
+ "right-of"
760
+ ]
761
+ },
762
+ "target": {
763
+ "$ref": "#/$defs/ConstraintNodeReference"
764
+ },
765
+ "gap": {
766
+ "type": "number",
767
+ "minimum": 0,
768
+ "default": 0
769
+ },
770
+ "alignment": {
771
+ "type": "string",
772
+ "enum": [
773
+ "start",
774
+ "center",
775
+ "end"
776
+ ],
777
+ "default": "center"
778
+ }
314
779
  }
315
780
  },
316
781
  "BoundaryConstraint": {
317
782
  "type": "object",
318
783
  "additionalProperties": false,
319
- "required": ["id", "kind", "subject", "side", "scope"],
784
+ "required": [
785
+ "id",
786
+ "kind",
787
+ "subject",
788
+ "side",
789
+ "scope"
790
+ ],
320
791
  "properties": {
321
- "id": { "$ref": "#/$defs/Identifier" },
322
- "kind": { "const": "boundary" },
323
- "strength": { "type": "string", "enum": ["required", "preferred"], "default": "required" },
324
- "sourceInfo": { "$ref": "#/$defs/SourceInfo" },
325
- "subject": { "$ref": "#/$defs/ConstraintNodeReference" },
326
- "side": { "type": "string", "enum": ["top", "bottom", "left", "right"] },
327
- "scope": { "$ref": "#/$defs/BoundaryScope" },
328
- "inset": { "type": "number", "minimum": 0, "default": 0 }
792
+ "id": {
793
+ "$ref": "#/$defs/Identifier"
794
+ },
795
+ "kind": {
796
+ "const": "boundary"
797
+ },
798
+ "strength": {
799
+ "type": "string",
800
+ "enum": [
801
+ "required",
802
+ "preferred"
803
+ ],
804
+ "default": "required"
805
+ },
806
+ "sourceInfo": {
807
+ "$ref": "#/$defs/SourceInfo"
808
+ },
809
+ "subject": {
810
+ "$ref": "#/$defs/ConstraintNodeReference"
811
+ },
812
+ "side": {
813
+ "type": "string",
814
+ "enum": [
815
+ "top",
816
+ "bottom",
817
+ "left",
818
+ "right"
819
+ ]
820
+ },
821
+ "scope": {
822
+ "$ref": "#/$defs/BoundaryScope"
823
+ },
824
+ "inset": {
825
+ "type": "number",
826
+ "minimum": 0,
827
+ "default": 0
828
+ }
329
829
  }
330
830
  },
331
831
  "ArrangementConstraint": {
332
832
  "type": "object",
333
833
  "additionalProperties": false,
334
- "required": ["id", "kind", "subjects", "axis"],
834
+ "required": [
835
+ "id",
836
+ "kind",
837
+ "subjects",
838
+ "axis"
839
+ ],
335
840
  "properties": {
336
- "id": { "$ref": "#/$defs/Identifier" },
337
- "kind": { "const": "arrangement" },
338
- "strength": { "type": "string", "enum": ["required", "preferred"], "default": "required" },
339
- "sourceInfo": { "$ref": "#/$defs/SourceInfo" },
841
+ "id": {
842
+ "$ref": "#/$defs/Identifier"
843
+ },
844
+ "kind": {
845
+ "const": "arrangement"
846
+ },
847
+ "strength": {
848
+ "type": "string",
849
+ "enum": [
850
+ "required",
851
+ "preferred"
852
+ ],
853
+ "default": "required"
854
+ },
855
+ "sourceInfo": {
856
+ "$ref": "#/$defs/SourceInfo"
857
+ },
340
858
  "subjects": {
341
859
  "type": "array",
342
860
  "minItems": 2,
343
861
  "uniqueItems": true,
344
- "items": { "$ref": "#/$defs/ConstraintNodeReference" }
862
+ "items": {
863
+ "$ref": "#/$defs/ConstraintNodeReference"
864
+ }
865
+ },
866
+ "axis": {
867
+ "type": "string",
868
+ "enum": [
869
+ "row",
870
+ "column"
871
+ ]
872
+ },
873
+ "direction": {
874
+ "type": "string",
875
+ "enum": [
876
+ "forward",
877
+ "reverse"
878
+ ],
879
+ "default": "forward"
880
+ },
881
+ "gap": {
882
+ "type": "number",
883
+ "minimum": 0,
884
+ "default": 0
345
885
  },
346
- "axis": { "type": "string", "enum": ["row", "column"] },
347
- "direction": { "type": "string", "enum": ["forward", "reverse"], "default": "forward" },
348
- "gap": { "type": "number", "minimum": 0, "default": 0 },
349
- "alignment": { "type": "string", "enum": ["start", "center", "end"], "default": "center" }
886
+ "alignment": {
887
+ "type": "string",
888
+ "enum": [
889
+ "start",
890
+ "center",
891
+ "end"
892
+ ],
893
+ "default": "center"
894
+ }
350
895
  }
351
896
  },
352
897
  "SpatialConstraint": {
353
898
  "oneOf": [
354
- { "$ref": "#/$defs/RelativeConstraint" },
355
- { "$ref": "#/$defs/BoundaryConstraint" },
356
- { "$ref": "#/$defs/ArrangementConstraint" }
899
+ {
900
+ "$ref": "#/$defs/RelativeConstraint"
901
+ },
902
+ {
903
+ "$ref": "#/$defs/BoundaryConstraint"
904
+ },
905
+ {
906
+ "$ref": "#/$defs/ArrangementConstraint"
907
+ }
357
908
  ]
358
909
  },
359
910
  "SourcePosition": {
360
911
  "type": "object",
361
912
  "additionalProperties": false,
362
- "required": ["line", "column"],
913
+ "required": [
914
+ "line",
915
+ "column"
916
+ ],
363
917
  "properties": {
364
- "line": { "type": "integer", "minimum": 0 },
365
- "column": { "type": "integer", "minimum": 0 }
918
+ "line": {
919
+ "type": "integer",
920
+ "minimum": 0
921
+ },
922
+ "column": {
923
+ "type": "integer",
924
+ "minimum": 0
925
+ }
366
926
  }
367
927
  },
368
928
  "SourceRange": {
369
929
  "type": "object",
370
930
  "additionalProperties": false,
371
- "required": ["start", "end"],
931
+ "required": [
932
+ "start",
933
+ "end"
934
+ ],
372
935
  "properties": {
373
- "start": { "type": "integer", "minimum": 0 },
374
- "end": { "type": "integer", "minimum": 0 },
375
- "startPosition": { "$ref": "#/$defs/SourcePosition" },
376
- "endPosition": { "$ref": "#/$defs/SourcePosition" }
936
+ "start": {
937
+ "type": "integer",
938
+ "minimum": 0
939
+ },
940
+ "end": {
941
+ "type": "integer",
942
+ "minimum": 0
943
+ },
944
+ "startPosition": {
945
+ "$ref": "#/$defs/SourcePosition"
946
+ },
947
+ "endPosition": {
948
+ "$ref": "#/$defs/SourcePosition"
949
+ }
377
950
  }
378
951
  },
379
952
  "Comment": {
380
953
  "type": "object",
381
954
  "additionalProperties": false,
382
- "required": ["text", "style"],
955
+ "required": [
956
+ "text",
957
+ "style"
958
+ ],
383
959
  "properties": {
384
- "text": { "type": "string" },
385
- "style": { "type": "string", "enum": ["line", "block"] },
386
- "range": { "$ref": "#/$defs/SourceRange" }
960
+ "text": {
961
+ "type": "string"
962
+ },
963
+ "style": {
964
+ "type": "string",
965
+ "enum": [
966
+ "line",
967
+ "block"
968
+ ]
969
+ },
970
+ "range": {
971
+ "$ref": "#/$defs/SourceRange"
972
+ }
387
973
  }
388
974
  },
389
975
  "SourceInfo": {
390
976
  "type": "object",
391
977
  "additionalProperties": false,
392
- "required": ["range"],
978
+ "required": [
979
+ "range"
980
+ ],
393
981
  "properties": {
394
- "range": { "$ref": "#/$defs/SourceRange" },
395
- "leadingComments": { "type": "array", "items": { "$ref": "#/$defs/Comment" } },
396
- "trailingComment": { "$ref": "#/$defs/Comment" },
397
- "leadingWhitespace": { "type": "string" },
398
- "modified": { "type": "boolean" },
399
- "originalText": { "type": "string" }
982
+ "range": {
983
+ "$ref": "#/$defs/SourceRange"
984
+ },
985
+ "leadingComments": {
986
+ "type": "array",
987
+ "items": {
988
+ "$ref": "#/$defs/Comment"
989
+ }
990
+ },
991
+ "trailingComment": {
992
+ "$ref": "#/$defs/Comment"
993
+ },
994
+ "leadingWhitespace": {
995
+ "type": "string"
996
+ },
997
+ "modified": {
998
+ "type": "boolean"
999
+ },
1000
+ "originalText": {
1001
+ "type": "string"
1002
+ }
400
1003
  }
401
1004
  },
402
1005
  "GraphMetadata": {
403
1006
  "type": "object",
404
1007
  "additionalProperties": false,
405
1008
  "properties": {
406
- "author": { "type": "string" },
407
- "created": { "type": "string", "format": "date-time" },
408
- "modified": { "type": "string", "format": "date-time" },
409
- "description": { "type": "string" },
410
- "tags": { "type": "array", "items": { "type": "string" } },
411
- "notation": { "type": "string" },
412
- "custom": { "type": "object", "additionalProperties": true }
1009
+ "author": {
1010
+ "type": "string"
1011
+ },
1012
+ "created": {
1013
+ "type": "string",
1014
+ "format": "date-time"
1015
+ },
1016
+ "modified": {
1017
+ "type": "string",
1018
+ "format": "date-time"
1019
+ },
1020
+ "description": {
1021
+ "type": "string"
1022
+ },
1023
+ "tags": {
1024
+ "type": "array",
1025
+ "items": {
1026
+ "type": "string"
1027
+ }
1028
+ },
1029
+ "notation": {
1030
+ "type": "string"
1031
+ },
1032
+ "custom": {
1033
+ "type": "object",
1034
+ "additionalProperties": true
1035
+ }
1036
+ }
1037
+ },
1038
+ "NotationProfile": {
1039
+ "oneOf": [
1040
+ {
1041
+ "type": "object",
1042
+ "additionalProperties": false,
1043
+ "required": [
1044
+ "id",
1045
+ "kind",
1046
+ "version"
1047
+ ],
1048
+ "properties": {
1049
+ "id": {
1050
+ "const": "uml"
1051
+ },
1052
+ "kind": {
1053
+ "const": "class"
1054
+ },
1055
+ "version": {
1056
+ "const": "1.0.0"
1057
+ }
1058
+ }
1059
+ },
1060
+ {
1061
+ "type": "object",
1062
+ "additionalProperties": false,
1063
+ "required": [
1064
+ "id",
1065
+ "kind",
1066
+ "version"
1067
+ ],
1068
+ "properties": {
1069
+ "id": {
1070
+ "const": "uml"
1071
+ },
1072
+ "kind": {
1073
+ "const": "sequence"
1074
+ },
1075
+ "version": {
1076
+ "const": "1.0.0"
1077
+ }
1078
+ }
1079
+ }
1080
+ ]
1081
+ },
1082
+ "ClassifierParameter": {
1083
+ "type": "object",
1084
+ "additionalProperties": false,
1085
+ "required": [
1086
+ "name"
1087
+ ],
1088
+ "properties": {
1089
+ "name": {
1090
+ "$ref": "#/$defs/Identifier"
1091
+ },
1092
+ "type": {
1093
+ "$ref": "#/$defs/Identifier"
1094
+ }
1095
+ }
1096
+ },
1097
+ "ClassifierAttribute": {
1098
+ "type": "object",
1099
+ "additionalProperties": false,
1100
+ "required": [
1101
+ "id",
1102
+ "kind",
1103
+ "name"
1104
+ ],
1105
+ "properties": {
1106
+ "id": {
1107
+ "$ref": "#/$defs/Identifier"
1108
+ },
1109
+ "kind": {
1110
+ "const": "attribute"
1111
+ },
1112
+ "visibility": {
1113
+ "type": "string",
1114
+ "enum": [
1115
+ "public",
1116
+ "protected",
1117
+ "private",
1118
+ "package"
1119
+ ]
1120
+ },
1121
+ "name": {
1122
+ "$ref": "#/$defs/Identifier"
1123
+ },
1124
+ "type": {
1125
+ "$ref": "#/$defs/Identifier"
1126
+ },
1127
+ "modifiers": {
1128
+ "type": "array",
1129
+ "uniqueItems": true,
1130
+ "items": {
1131
+ "type": "string",
1132
+ "enum": [
1133
+ "abstract",
1134
+ "static",
1135
+ "readonly",
1136
+ "derived"
1137
+ ]
1138
+ }
1139
+ }
1140
+ }
1141
+ },
1142
+ "ClassifierOperation": {
1143
+ "type": "object",
1144
+ "additionalProperties": false,
1145
+ "required": [
1146
+ "id",
1147
+ "kind",
1148
+ "name",
1149
+ "parameters"
1150
+ ],
1151
+ "properties": {
1152
+ "id": {
1153
+ "$ref": "#/$defs/Identifier"
1154
+ },
1155
+ "kind": {
1156
+ "const": "operation"
1157
+ },
1158
+ "visibility": {
1159
+ "type": "string",
1160
+ "enum": [
1161
+ "public",
1162
+ "protected",
1163
+ "private",
1164
+ "package"
1165
+ ]
1166
+ },
1167
+ "name": {
1168
+ "$ref": "#/$defs/Identifier"
1169
+ },
1170
+ "parameters": {
1171
+ "type": "array",
1172
+ "items": {
1173
+ "$ref": "#/$defs/ClassifierParameter"
1174
+ }
1175
+ },
1176
+ "returnType": {
1177
+ "$ref": "#/$defs/Identifier"
1178
+ },
1179
+ "modifiers": {
1180
+ "type": "array",
1181
+ "uniqueItems": true,
1182
+ "items": {
1183
+ "type": "string",
1184
+ "enum": [
1185
+ "abstract",
1186
+ "static",
1187
+ "readonly",
1188
+ "derived"
1189
+ ]
1190
+ }
1191
+ }
1192
+ }
1193
+ },
1194
+ "ClassifierLiteral": {
1195
+ "type": "object",
1196
+ "additionalProperties": false,
1197
+ "required": [
1198
+ "id",
1199
+ "kind",
1200
+ "name"
1201
+ ],
1202
+ "properties": {
1203
+ "id": {
1204
+ "$ref": "#/$defs/Identifier"
1205
+ },
1206
+ "kind": {
1207
+ "const": "literal"
1208
+ },
1209
+ "name": {
1210
+ "$ref": "#/$defs/Identifier"
1211
+ },
1212
+ "value": {
1213
+ "type": "string"
1214
+ }
1215
+ }
1216
+ },
1217
+ "ClassifierCompartment": {
1218
+ "oneOf": [
1219
+ {
1220
+ "type": "object",
1221
+ "additionalProperties": false,
1222
+ "required": [
1223
+ "id",
1224
+ "kind"
1225
+ ],
1226
+ "properties": {
1227
+ "id": {
1228
+ "$ref": "#/$defs/Identifier"
1229
+ },
1230
+ "kind": {
1231
+ "const": "name"
1232
+ }
1233
+ }
1234
+ },
1235
+ {
1236
+ "type": "object",
1237
+ "additionalProperties": false,
1238
+ "required": [
1239
+ "id",
1240
+ "kind",
1241
+ "items"
1242
+ ],
1243
+ "properties": {
1244
+ "id": {
1245
+ "$ref": "#/$defs/Identifier"
1246
+ },
1247
+ "kind": {
1248
+ "const": "attributes"
1249
+ },
1250
+ "items": {
1251
+ "type": "array",
1252
+ "items": {
1253
+ "$ref": "#/$defs/ClassifierAttribute"
1254
+ }
1255
+ }
1256
+ }
1257
+ },
1258
+ {
1259
+ "type": "object",
1260
+ "additionalProperties": false,
1261
+ "required": [
1262
+ "id",
1263
+ "kind",
1264
+ "items"
1265
+ ],
1266
+ "properties": {
1267
+ "id": {
1268
+ "$ref": "#/$defs/Identifier"
1269
+ },
1270
+ "kind": {
1271
+ "const": "operations"
1272
+ },
1273
+ "items": {
1274
+ "type": "array",
1275
+ "items": {
1276
+ "$ref": "#/$defs/ClassifierOperation"
1277
+ }
1278
+ }
1279
+ }
1280
+ },
1281
+ {
1282
+ "type": "object",
1283
+ "additionalProperties": false,
1284
+ "required": [
1285
+ "id",
1286
+ "kind",
1287
+ "items"
1288
+ ],
1289
+ "properties": {
1290
+ "id": {
1291
+ "$ref": "#/$defs/Identifier"
1292
+ },
1293
+ "kind": {
1294
+ "const": "literals"
1295
+ },
1296
+ "items": {
1297
+ "type": "array",
1298
+ "items": {
1299
+ "$ref": "#/$defs/ClassifierLiteral"
1300
+ }
1301
+ }
1302
+ }
1303
+ }
1304
+ ]
1305
+ },
1306
+ "Classifier": {
1307
+ "type": "object",
1308
+ "additionalProperties": false,
1309
+ "required": [
1310
+ "kind",
1311
+ "name",
1312
+ "compartments"
1313
+ ],
1314
+ "properties": {
1315
+ "kind": {
1316
+ "type": "string",
1317
+ "enum": [
1318
+ "class",
1319
+ "interface",
1320
+ "enum"
1321
+ ]
1322
+ },
1323
+ "name": {
1324
+ "$ref": "#/$defs/Identifier"
1325
+ },
1326
+ "modifiers": {
1327
+ "type": "array",
1328
+ "uniqueItems": true,
1329
+ "items": {
1330
+ "type": "string",
1331
+ "enum": [
1332
+ "abstract",
1333
+ "static"
1334
+ ]
1335
+ }
1336
+ },
1337
+ "compartments": {
1338
+ "type": "array",
1339
+ "minItems": 1,
1340
+ "items": {
1341
+ "$ref": "#/$defs/ClassifierCompartment"
1342
+ }
1343
+ }
1344
+ },
1345
+ "allOf": [
1346
+ {
1347
+ "properties": {
1348
+ "compartments": {
1349
+ "contains": {
1350
+ "properties": { "kind": { "const": "name" } },
1351
+ "required": ["kind"]
1352
+ },
1353
+ "minContains": 1,
1354
+ "maxContains": 1
1355
+ }
1356
+ }
1357
+ },
1358
+ {
1359
+ "if": {
1360
+ "properties": { "kind": { "enum": ["class", "interface"] } },
1361
+ "required": ["kind"]
1362
+ },
1363
+ "then": {
1364
+ "properties": {
1365
+ "compartments": {
1366
+ "allOf": [
1367
+ {
1368
+ "contains": { "properties": { "kind": { "const": "attributes" } }, "required": ["kind"] },
1369
+ "minContains": 0,
1370
+ "maxContains": 1
1371
+ },
1372
+ {
1373
+ "contains": { "properties": { "kind": { "const": "operations" } }, "required": ["kind"] },
1374
+ "minContains": 0,
1375
+ "maxContains": 1
1376
+ },
1377
+ {
1378
+ "not": {
1379
+ "contains": { "properties": { "kind": { "const": "literals" } }, "required": ["kind"] }
1380
+ }
1381
+ }
1382
+ ]
1383
+ }
1384
+ }
1385
+ }
1386
+ },
1387
+ {
1388
+ "if": {
1389
+ "properties": { "kind": { "const": "enum" } },
1390
+ "required": ["kind"]
1391
+ },
1392
+ "then": {
1393
+ "properties": {
1394
+ "compartments": {
1395
+ "allOf": [
1396
+ {
1397
+ "contains": { "properties": { "kind": { "const": "literals" } }, "required": ["kind"] },
1398
+ "minContains": 1,
1399
+ "maxContains": 1
1400
+ },
1401
+ {
1402
+ "contains": { "properties": { "kind": { "const": "operations" } }, "required": ["kind"] },
1403
+ "minContains": 0,
1404
+ "maxContains": 1
1405
+ },
1406
+ {
1407
+ "not": {
1408
+ "contains": { "properties": { "kind": { "const": "attributes" } }, "required": ["kind"] }
1409
+ }
1410
+ }
1411
+ ]
1412
+ }
1413
+ }
1414
+ }
1415
+ }
1416
+ ]
1417
+ },
1418
+ "Multiplicity": {
1419
+ "type": "object",
1420
+ "additionalProperties": false,
1421
+ "required": [
1422
+ "lower",
1423
+ "upper"
1424
+ ],
1425
+ "properties": {
1426
+ "lower": {
1427
+ "type": "integer",
1428
+ "minimum": 0
1429
+ },
1430
+ "upper": {
1431
+ "oneOf": [
1432
+ {
1433
+ "type": "integer",
1434
+ "minimum": 0
1435
+ },
1436
+ {
1437
+ "const": "*"
1438
+ }
1439
+ ]
1440
+ }
1441
+ }
1442
+ },
1443
+ "EndpointMarker": {
1444
+ "type": "object",
1445
+ "additionalProperties": false,
1446
+ "required": [
1447
+ "kind",
1448
+ "fill"
1449
+ ],
1450
+ "properties": {
1451
+ "kind": {
1452
+ "type": "string",
1453
+ "enum": [
1454
+ "none",
1455
+ "arrow",
1456
+ "triangle",
1457
+ "diamond",
1458
+ "circle",
1459
+ "bar",
1460
+ "crow-foot",
1461
+ "zero-or-one",
1462
+ "one",
1463
+ "zero-or-many",
1464
+ "one-or-many"
1465
+ ]
1466
+ },
1467
+ "fill": {
1468
+ "type": "string",
1469
+ "enum": [
1470
+ "open",
1471
+ "filled",
1472
+ "unspecified"
1473
+ ]
1474
+ }
1475
+ },
1476
+ "allOf": [
1477
+ {
1478
+ "if": {
1479
+ "properties": {
1480
+ "kind": {
1481
+ "enum": [
1482
+ "none",
1483
+ "bar",
1484
+ "crow-foot",
1485
+ "zero-or-one",
1486
+ "one",
1487
+ "zero-or-many",
1488
+ "one-or-many"
1489
+ ]
1490
+ }
1491
+ },
1492
+ "required": [
1493
+ "kind"
1494
+ ]
1495
+ },
1496
+ "then": {
1497
+ "properties": {
1498
+ "fill": {
1499
+ "const": "unspecified"
1500
+ }
1501
+ }
1502
+ }
1503
+ }
1504
+ ]
1505
+ },
1506
+ "RelationshipEnd": {
1507
+ "type": "object",
1508
+ "additionalProperties": false,
1509
+ "required": [],
1510
+ "properties": {
1511
+ "role": {
1512
+ "$ref": "#/$defs/Identifier"
1513
+ },
1514
+ "multiplicity": {
1515
+ "$ref": "#/$defs/Multiplicity"
1516
+ },
1517
+ "navigability": {
1518
+ "type": "string",
1519
+ "enum": [
1520
+ "navigable",
1521
+ "non-navigable",
1522
+ "unspecified"
1523
+ ]
1524
+ },
1525
+ "marker": {
1526
+ "$ref": "#/$defs/EndpointMarker"
1527
+ }
1528
+ }
1529
+ },
1530
+ "InteractionParticipant": {
1531
+ "type": "object",
1532
+ "additionalProperties": false,
1533
+ "required": [
1534
+ "id",
1535
+ "nodeId"
1536
+ ],
1537
+ "properties": {
1538
+ "id": {
1539
+ "$ref": "#/$defs/Identifier"
1540
+ },
1541
+ "nodeId": {
1542
+ "$ref": "#/$defs/Identifier"
1543
+ }
1544
+ }
1545
+ },
1546
+ "InteractionMessage": {
1547
+ "type": "object",
1548
+ "additionalProperties": false,
1549
+ "required": [
1550
+ "id",
1551
+ "edgeId",
1552
+ "sourceParticipantId",
1553
+ "targetParticipantId"
1554
+ ],
1555
+ "properties": {
1556
+ "id": {
1557
+ "$ref": "#/$defs/Identifier"
1558
+ },
1559
+ "edgeId": {
1560
+ "$ref": "#/$defs/Identifier"
1561
+ },
1562
+ "sourceParticipantId": {
1563
+ "$ref": "#/$defs/Identifier"
1564
+ },
1565
+ "targetParticipantId": {
1566
+ "$ref": "#/$defs/Identifier"
1567
+ },
1568
+ "kind": {
1569
+ "type": "string",
1570
+ "enum": [
1571
+ "synchronous",
1572
+ "asynchronous",
1573
+ "return",
1574
+ "create",
1575
+ "destroy"
1576
+ ]
1577
+ }
1578
+ }
1579
+ },
1580
+ "InteractionActivation": {
1581
+ "type": "object",
1582
+ "additionalProperties": false,
1583
+ "required": [
1584
+ "id",
1585
+ "participantId",
1586
+ "startMessageId",
1587
+ "endMessageId"
1588
+ ],
1589
+ "properties": {
1590
+ "id": {
1591
+ "$ref": "#/$defs/Identifier"
1592
+ },
1593
+ "participantId": {
1594
+ "$ref": "#/$defs/Identifier"
1595
+ },
1596
+ "startMessageId": {
1597
+ "$ref": "#/$defs/Identifier"
1598
+ },
1599
+ "endMessageId": {
1600
+ "$ref": "#/$defs/Identifier"
1601
+ }
1602
+ }
1603
+ },
1604
+ "InteractionGuard": {
1605
+ "type": "object",
1606
+ "additionalProperties": false,
1607
+ "required": [
1608
+ "id",
1609
+ "text"
1610
+ ],
1611
+ "properties": {
1612
+ "id": {
1613
+ "$ref": "#/$defs/Identifier"
1614
+ },
1615
+ "text": {
1616
+ "$ref": "#/$defs/Identifier"
1617
+ }
1618
+ }
1619
+ },
1620
+ "InteractionOperand": {
1621
+ "type": "object",
1622
+ "additionalProperties": false,
1623
+ "required": [
1624
+ "id",
1625
+ "messageIds"
1626
+ ],
1627
+ "properties": {
1628
+ "id": {
1629
+ "$ref": "#/$defs/Identifier"
1630
+ },
1631
+ "guard": {
1632
+ "$ref": "#/$defs/InteractionGuard"
1633
+ },
1634
+ "messageIds": {
1635
+ "type": "array",
1636
+ "uniqueItems": true,
1637
+ "items": {
1638
+ "$ref": "#/$defs/Identifier"
1639
+ }
1640
+ }
1641
+ }
1642
+ },
1643
+ "InteractionFragment": {
1644
+ "type": "object",
1645
+ "additionalProperties": false,
1646
+ "required": [
1647
+ "id",
1648
+ "kind",
1649
+ "operands"
1650
+ ],
1651
+ "properties": {
1652
+ "id": {
1653
+ "$ref": "#/$defs/Identifier"
1654
+ },
1655
+ "kind": {
1656
+ "type": "string",
1657
+ "enum": [
1658
+ "loop",
1659
+ "alt",
1660
+ "opt"
1661
+ ]
1662
+ },
1663
+ "operands": {
1664
+ "type": "array",
1665
+ "items": {
1666
+ "$ref": "#/$defs/InteractionOperand"
1667
+ }
1668
+ }
1669
+ },
1670
+ "allOf": [
1671
+ {
1672
+ "if": {
1673
+ "properties": {
1674
+ "kind": {
1675
+ "enum": [
1676
+ "loop",
1677
+ "opt"
1678
+ ]
1679
+ }
1680
+ },
1681
+ "required": [
1682
+ "kind"
1683
+ ]
1684
+ },
1685
+ "then": {
1686
+ "properties": {
1687
+ "operands": {
1688
+ "minItems": 1,
1689
+ "maxItems": 1
1690
+ }
1691
+ }
1692
+ }
1693
+ },
1694
+ {
1695
+ "if": {
1696
+ "properties": {
1697
+ "kind": {
1698
+ "const": "alt"
1699
+ }
1700
+ },
1701
+ "required": [
1702
+ "kind"
1703
+ ]
1704
+ },
1705
+ "then": {
1706
+ "properties": {
1707
+ "operands": {
1708
+ "minItems": 2
1709
+ }
1710
+ }
1711
+ }
1712
+ }
1713
+ ]
1714
+ },
1715
+ "InteractionNote": {
1716
+ "type": "object",
1717
+ "additionalProperties": false,
1718
+ "required": [
1719
+ "id",
1720
+ "text"
1721
+ ],
1722
+ "properties": {
1723
+ "id": {
1724
+ "$ref": "#/$defs/Identifier"
1725
+ },
1726
+ "text": {
1727
+ "$ref": "#/$defs/Identifier"
1728
+ },
1729
+ "participantIds": {
1730
+ "type": "array",
1731
+ "minItems": 1,
1732
+ "uniqueItems": true,
1733
+ "items": {
1734
+ "$ref": "#/$defs/Identifier"
1735
+ }
1736
+ },
1737
+ "messageIds": {
1738
+ "type": "array",
1739
+ "minItems": 1,
1740
+ "uniqueItems": true,
1741
+ "items": {
1742
+ "$ref": "#/$defs/Identifier"
1743
+ }
1744
+ }
1745
+ },
1746
+ "anyOf": [
1747
+ {
1748
+ "required": [
1749
+ "participantIds"
1750
+ ]
1751
+ },
1752
+ {
1753
+ "required": [
1754
+ "messageIds"
1755
+ ]
1756
+ }
1757
+ ]
1758
+ },
1759
+ "Interaction": {
1760
+ "type": "object",
1761
+ "additionalProperties": false,
1762
+ "required": [
1763
+ "participants",
1764
+ "participantOrder",
1765
+ "messages",
1766
+ "messageOrder"
1767
+ ],
1768
+ "properties": {
1769
+ "participants": {
1770
+ "type": "array",
1771
+ "items": {
1772
+ "$ref": "#/$defs/InteractionParticipant"
1773
+ }
1774
+ },
1775
+ "participantOrder": {
1776
+ "type": "array",
1777
+ "uniqueItems": true,
1778
+ "items": {
1779
+ "$ref": "#/$defs/Identifier"
1780
+ }
1781
+ },
1782
+ "messages": {
1783
+ "type": "array",
1784
+ "items": {
1785
+ "$ref": "#/$defs/InteractionMessage"
1786
+ }
1787
+ },
1788
+ "messageOrder": {
1789
+ "type": "array",
1790
+ "uniqueItems": true,
1791
+ "items": {
1792
+ "$ref": "#/$defs/Identifier"
1793
+ }
1794
+ },
1795
+ "activations": {
1796
+ "type": "array",
1797
+ "items": {
1798
+ "$ref": "#/$defs/InteractionActivation"
1799
+ }
1800
+ },
1801
+ "fragments": {
1802
+ "type": "array",
1803
+ "items": {
1804
+ "$ref": "#/$defs/InteractionFragment"
1805
+ }
1806
+ },
1807
+ "notes": {
1808
+ "type": "array",
1809
+ "items": {
1810
+ "$ref": "#/$defs/InteractionNote"
1811
+ }
1812
+ }
413
1813
  }
414
1814
  }
415
1815
  }