tree.schema.json
141 lines · archify/schemas/tree.schema.json at a406594
1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://github.com/tt-a1i/archify/schemas/tree.schema.json",
4 "title": "Archify Hierarchy and Tree Diagram",
5 "type": "object",
6 "additionalProperties": false,
7 "required": [
8 "schema_version",
9 "diagram_type",
10 "meta",
11 "nodes"
12 ],
13 "properties": {
14 "schema_version": {
15 "const": 1
16 },
17 "diagram_type": {
18 "const": "tree"
19 },
20 "meta": {
21 "type": "object",
22 "additionalProperties": false,
23 "required": [
24 "title"
25 ],
26 "properties": {
27 "title": {
28 "type": "string",
29 "minLength": 1
30 },
31 "locale": {
32 "$ref": "common.schema.json#/$defs/locale"
33 },
34 "translations": {
35 "$ref": "common.schema.json#/$defs/translations"
36 },
37 "subtitle": {
38 "type": "string"
39 },
40 "output": {
41 "type": "string"
42 },
43 "animation": {
44 "$ref": "common.schema.json#/$defs/animation"
45 },
46 "visual_preset": {
47 "$ref": "common.schema.json#/$defs/visualPreset"
48 },
49 "quality_profile": {
50 "$ref": "common.schema.json#/$defs/qualityProfile"
51 },
52 "repository": {
53 "$ref": "common.schema.json#/$defs/repository"
54 },
55 "views": {
56 "$ref": "common.schema.json#/$defs/guidedViews"
57 },
58 "viewBox": {
59 "type": "array",
60 "prefixItems": [
61 {
62 "type": "number",
63 "minimum": 320
64 },
65 {
66 "type": "number",
67 "minimum": 240
68 }
69 ],
70 "items": false,
71 "minItems": 2,
72 "maxItems": 2
73 }
74 }
75 },
76 "layout": {
77 "type": "object",
78 "additionalProperties": false,
79 "properties": {
80 "direction": {
81 "enum": [
82 "down",
83 "right"
84 ]
85 },
86 "gapX": {
87 "type": "number",
88 "minimum": 16
89 },
90 "gapY": {
91 "type": "number",
92 "minimum": 24
93 },
94 "nodeW": {
95 "type": "number",
96 "minimum": 96
97 },
98 "nodeMaxW": {
99 "type": "number",
100 "minimum": 120
101 }
102 }
103 },
104 "nodes": {
105 "type": "array",
106 "minItems": 1,
107 "items": {
108 "type": "object",
109 "additionalProperties": false,
110 "required": [
111 "id",
112 "label"
113 ],
114 "properties": {
115 "id": {
116 "$ref": "common.schema.json#/$defs/id"
117 },
118 "label": {
119 "type": "string",
120 "minLength": 1
121 },
122 "parent": {
123 "$ref": "common.schema.json#/$defs/id"
124 },
125 "sublabel": {
126 "type": "string"
127 },
128 "collapsed": {
129 "type": "boolean"
130 },
131 "sources": {
132 "$ref": "common.schema.json#/$defs/sourceReferences"
133 }
134 }
135 }
136 },
137 "cards": {
138 "$ref": "common.schema.json#/$defs/cards"
139 }
140 }
141}