Skip to content

Commit 84866d0

Browse files
author
Alan Christie
committed
build: Add experimental json copy of the schema
1 parent 37d5ad2 commit 84866d0

File tree

1 file changed

+344
-0
lines changed

1 file changed

+344
-0
lines changed

workflow/workflow-schema.json

Lines changed: 344 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,344 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Data Manager Workflow Schema",
4+
"description": "The Schema for Data Manager Workflows",
5+
"type": "object",
6+
"properties": {
7+
"kind": {
8+
"const": "DataManagerWorkflow"
9+
},
10+
"kind-version": {
11+
"enum": [
12+
"2025.2"
13+
]
14+
},
15+
"name": {
16+
"$ref": "#/definitions/rfc1035-label-name"
17+
},
18+
"description": {
19+
"type": "string",
20+
"description": "A description of the workflow"
21+
},
22+
"steps": {
23+
"type": "array",
24+
"items": {
25+
"$ref": "#/definitions/step"
26+
}
27+
},
28+
"variables": {
29+
"type": "object",
30+
"additionalProperties": true
31+
},
32+
"variable-mapping": {
33+
"type": "object",
34+
"additionalProperties": false,
35+
"properties": {
36+
"inputs": {
37+
"type": "array",
38+
"items": {
39+
"$ref": "#/definitions/workflow-input-parameter"
40+
}
41+
},
42+
"outputs": {
43+
"type": "array",
44+
"items": {
45+
"$ref": "#/definitions/workflow-output-parameter"
46+
}
47+
},
48+
"options": {
49+
"type": "array",
50+
"items": {
51+
"$ref": "#/definitions/workflow-option-parameter"
52+
}
53+
}
54+
}
55+
}
56+
},
57+
"required": [
58+
"kind",
59+
"kind-version",
60+
"name",
61+
"steps"
62+
],
63+
"definitions": {
64+
"rfc1035-label-name": {
65+
"type": "string",
66+
"pattern": "^[a-z][a-z0-9-]{,63}(?<!-)$",
67+
"description": "A value compatible with Kubernetes variables to allow it to be used ins Pod Label"
68+
},
69+
"template-variable-name": {
70+
"type": "string",
71+
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
72+
},
73+
"file-name": {
74+
"type": "string",
75+
"pattern": "^[a-zA-Z0-9._-]+$"
76+
},
77+
"workflow-input-parameter": {
78+
"type": "object",
79+
"additionalProperties": false,
80+
"properties": {
81+
"name": {
82+
"$ref": "#/definitions/template-variable-name"
83+
}
84+
},
85+
"required": [
86+
"name"
87+
]
88+
},
89+
"workflow-output-parameter": {
90+
"type": "object",
91+
"additionalProperties": false,
92+
"properties": {
93+
"name": {
94+
"$ref": "#/definitions/template-variable-name"
95+
},
96+
"from": {
97+
"$ref": "#/definitions/from-step-output"
98+
}
99+
},
100+
"required": [
101+
"name"
102+
]
103+
},
104+
"as-step-option": {
105+
"type": "object",
106+
"additionalProperties": false,
107+
"properties": {
108+
"option": {
109+
"$ref": "#/definitions/template-variable-name"
110+
},
111+
"step": {
112+
"$ref": "#/definitions/rfc1035-label-name"
113+
}
114+
},
115+
"required": [
116+
"option",
117+
"step"
118+
]
119+
},
120+
"from-workflow-input": {
121+
"type": "object",
122+
"additionalProperties": false,
123+
"properties": {
124+
"workflow-input": {
125+
"$ref": "#/definitions/template-variable-name"
126+
}
127+
},
128+
"required": [
129+
"workflow-input"
130+
]
131+
},
132+
"from-step-output": {
133+
"type": "object",
134+
"additionalProperties": false,
135+
"properties": {
136+
"step": {
137+
"$ref": "#/definitions/rfc1035-label-name"
138+
},
139+
"output": {
140+
"$ref": "#/definitions/template-variable-name"
141+
}
142+
},
143+
"required": [
144+
"step",
145+
"output"
146+
]
147+
},
148+
"workflow-option-parameter": {
149+
"type": "object",
150+
"additionalProperties": false,
151+
"properties": {
152+
"name": {
153+
"$ref": "#/definitions/template-variable-name"
154+
},
155+
"description": {
156+
"type": "string"
157+
},
158+
"default": {
159+
"oneOf": [
160+
{
161+
"type": "string"
162+
},
163+
{
164+
"type": "number"
165+
},
166+
{
167+
"type": "boolean"
168+
}
169+
]
170+
},
171+
"minimum": {
172+
"type": "number"
173+
},
174+
"maximum": {
175+
"type": "number"
176+
},
177+
"as": {
178+
"type": "array",
179+
"items": {
180+
"$ref": "#/definitions/as-step-option"
181+
}
182+
}
183+
},
184+
"required": [
185+
"name",
186+
"as"
187+
]
188+
},
189+
"replicate-using-input": {
190+
"type": "object",
191+
"additionalProperties": false,
192+
"properties": {
193+
"input": {
194+
"$ref": "#/definitions/template-variable-name"
195+
}
196+
},
197+
"required": [
198+
"input"
199+
]
200+
},
201+
"step-input-from-step": {
202+
"type": "object",
203+
"additionalProperties": false,
204+
"properties": {
205+
"input": {
206+
"$ref": "#/definitions/template-variable-name"
207+
},
208+
"from": {
209+
"$ref": "#/definitions/from-step-output"
210+
}
211+
},
212+
"required": [
213+
"input"
214+
]
215+
},
216+
"step-input-from-workflow": {
217+
"type": "object",
218+
"additionalProperties": false,
219+
"properties": {
220+
"input": {
221+
"$ref": "#/definitions/template-variable-name"
222+
},
223+
"from": {
224+
"$ref": "#/definitions/from-workflow-input"
225+
}
226+
},
227+
"required": [
228+
"input",
229+
"from"
230+
]
231+
},
232+
"step-output-as": {
233+
"type": "object",
234+
"additionalProperties": false,
235+
"properties": {
236+
"output": {
237+
"$ref": "#/definitions/template-variable-name"
238+
},
239+
"as": {
240+
"$ref": "#/definitions/file-name"
241+
}
242+
},
243+
"required": [
244+
"output",
245+
"as"
246+
]
247+
},
248+
"step-specification-variable": {
249+
"type": "object",
250+
"additionalProperties": false,
251+
"patternProperties": {
252+
"^[a-zA-Z]{1}[a-zA-Z0-9_]{0,79}$": {
253+
"oneOf": [
254+
{
255+
"type": "string"
256+
},
257+
{
258+
"type": "integer"
259+
},
260+
{
261+
"type": "boolean"
262+
}
263+
]
264+
}
265+
},
266+
"minProperties": 1
267+
},
268+
"step-specification": {
269+
"type": "object",
270+
"additionalProperties": false,
271+
"properties": {
272+
"collection": {
273+
"type": "string"
274+
},
275+
"job": {
276+
"type": "string"
277+
},
278+
"version": {
279+
"type": "string"
280+
},
281+
"variables": {
282+
"$ref": "#/definitions/step-specification-variable"
283+
}
284+
},
285+
"required": [
286+
"collection",
287+
"job",
288+
"version"
289+
]
290+
},
291+
"step": {
292+
"type": "object",
293+
"additionalProperties": false,
294+
"properties": {
295+
"name": {
296+
"$ref": "#/definitions/rfc1035-label-name"
297+
},
298+
"description": {
299+
"type": "string",
300+
"description": "A description of the step"
301+
},
302+
"specification": {
303+
"$ref": "#/definitions/step-specification"
304+
},
305+
"replicate": {
306+
"type": "object",
307+
"additionalProperties": false,
308+
"properties": {
309+
"using": {
310+
"$ref": "#/definitions/replicate-using-input"
311+
}
312+
}
313+
},
314+
"inputs": {
315+
"type": "array",
316+
"items": {
317+
"anyOf": [
318+
{
319+
"$ref": "#/definitions/step-input-from-step"
320+
},
321+
{
322+
"$ref": "#/definitions/step-input-from-workflow"
323+
}
324+
]
325+
}
326+
},
327+
"outputs": {
328+
"type": "array",
329+
"items": {
330+
"anyOf": [
331+
{
332+
"$ref": "#/definitions/step-output-as"
333+
}
334+
]
335+
}
336+
}
337+
},
338+
"required": [
339+
"name",
340+
"specification"
341+
]
342+
}
343+
}
344+
}

0 commit comments

Comments
 (0)