Skip to content

Commit 94ff9a0

Browse files
committed
add json-schema spec for the workflow
1 parent 1af9903 commit 94ff9a0

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed

json-schema/workflow.schema.json

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Workflow",
4+
"type": "object",
5+
"properties": {
6+
"tasks": {
7+
"type": "array",
8+
"items": {
9+
"$ref": "#/definitions/Task"
10+
},
11+
"description": "Worfklow tasks."
12+
},
13+
"name": {
14+
"type": "string",
15+
"description": "The name of the workflow."
16+
},
17+
"parameters": {
18+
"type": "object",
19+
"additionalProperties": {
20+
"type": "string"
21+
},
22+
"description": "Optional parameters for the workflow."
23+
},
24+
"schedule": {
25+
"type": "string",
26+
"description": "Optional schedule in cron format."
27+
},
28+
"timezone": {
29+
"type": "string",
30+
"description": "Timezone for the schedule."
31+
}
32+
},
33+
"required": [
34+
"tasks",
35+
"name"
36+
],
37+
"definitions": {
38+
"Task": {
39+
"type": "object",
40+
"properties": {
41+
"input_uri": {
42+
"type": "string",
43+
"description": "The URI of the input file."
44+
},
45+
"runtime_environment_name": {
46+
"type": "string",
47+
"description": "Name of the runtime environment."
48+
},
49+
"runtime_environment_parameters": {
50+
"type": "object",
51+
"additionalProperties": {
52+
"type": "string"
53+
},
54+
"description": "Parameters for the runtime environment."
55+
},
56+
"output_formats": {
57+
"type": "array",
58+
"items": {
59+
"type": "string"
60+
}
61+
},
62+
"parameters": {
63+
"type": "object",
64+
"additionalProperties": {
65+
"type": "string"
66+
},
67+
"description": "Task-specific parameters."
68+
},
69+
"tags": {
70+
"type": "array",
71+
"items": {
72+
"type": "string"
73+
},
74+
"description": "Tags for categorizing the job."
75+
},
76+
"name": {
77+
"type": "string",
78+
"description": "Name of the job."
79+
},
80+
"compute_type": {
81+
"type": "string",
82+
"description": "Type of compute resource to use."
83+
},
84+
"package_input_folder": {
85+
"type": "boolean",
86+
"description": "Whether to package the input folder."
87+
},
88+
"depends_on": {
89+
"type": "array",
90+
"items": {
91+
"type": "string"
92+
},
93+
"description": "DAG node IDs of tasks this task depends on."
94+
},
95+
"node_id": {
96+
"type": "string",
97+
"description": "DAG node ID of this task."
98+
}
99+
},
100+
"required": [
101+
"input_uri",
102+
"name",
103+
"node_id"
104+
]
105+
}
106+
}
107+
}

0 commit comments

Comments
 (0)