waterfall.schema.json
147 lines · archify/schemas/waterfall.schema.json at a406594
1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://github.com/tt-a1i/archify/schemas/waterfall.schema.json",
4 "title": "Archify Execution Waterfall",
5 "type": "object",
6 "additionalProperties": false,
7 "required": [
8 "schema_version",
9 "diagram_type",
10 "meta",
11 "spans"
12 ],
13 "properties": {
14 "schema_version": {
15 "const": 1
16 },
17 "diagram_type": {
18 "const": "waterfall"
19 },
20 "meta": {
21 "type": "object",
22 "additionalProperties": false,
23 "required": [
24 "title",
25 "evidence"
26 ],
27 "properties": {
28 "title": {
29 "type": "string",
30 "minLength": 1
31 },
32 "locale": {
33 "$ref": "common.schema.json#/$defs/locale"
34 },
35 "translations": {
36 "$ref": "common.schema.json#/$defs/translations"
37 },
38 "subtitle": {
39 "type": "string"
40 },
41 "output": {
42 "type": "string"
43 },
44 "animation": {
45 "$ref": "common.schema.json#/$defs/animation"
46 },
47 "visual_preset": {
48 "$ref": "common.schema.json#/$defs/visualPreset"
49 },
50 "quality_profile": {
51 "$ref": "common.schema.json#/$defs/qualityProfile"
52 },
53 "repository": {
54 "$ref": "common.schema.json#/$defs/repository"
55 },
56 "views": {
57 "$ref": "common.schema.json#/$defs/guidedViews"
58 },
59 "evidence": {
60 "enum": [
61 "measured",
62 "illustrative"
63 ],
64 "description": "Whether span timing is recorded measurement or illustrative input; drawn on the canvas."
65 },
66 "unit": {
67 "enum": [
68 "us",
69 "ms",
70 "s"
71 ],
72 "description": "Unit of every start, end, and duration; defaults to ms."
73 }
74 }
75 },
76 "layout": {
77 "type": "object",
78 "additionalProperties": false,
79 "properties": {
80 "width": {
81 "type": "number",
82 "minimum": 360,
83 "description": "Width of the time axis in px."
84 }
85 }
86 },
87 "spans": {
88 "type": "array",
89 "minItems": 1,
90 "items": {
91 "type": "object",
92 "additionalProperties": false,
93 "required": [
94 "id",
95 "name",
96 "start"
97 ],
98 "properties": {
99 "id": {
100 "$ref": "common.schema.json#/$defs/id"
101 },
102 "name": {
103 "type": "string",
104 "minLength": 1
105 },
106 "start": {
107 "type": "number",
108 "minimum": 0,
109 "description": "Offset from the trace origin, in meta.unit."
110 },
111 "end": {
112 "type": "number",
113 "minimum": 0
114 },
115 "duration": {
116 "type": "number",
117 "minimum": 0
118 },
119 "parent": {
120 "$ref": "common.schema.json#/$defs/id"
121 },
122 "status": {
123 "enum": [
124 "ok",
125 "error",
126 "cancelled",
127 "incomplete"
128 ]
129 },
130 "service": {
131 "type": "string",
132 "minLength": 1
133 },
134 "detail": {
135 "type": "string"
136 },
137 "sources": {
138 "$ref": "common.schema.json#/$defs/sourceReferences"
139 }
140 }
141 }
142 },
143 "cards": {
144 "$ref": "common.schema.json#/$defs/cards"
145 }
146 }
147}