Skip to content

Commit

Permalink
add json-schema spec for the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-i committed Nov 22, 2024
1 parent 1af9903 commit 2ce4800
Showing 1 changed file with 107 additions and 0 deletions.
107 changes: 107 additions & 0 deletions json-schema/workflow.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Workflow",
"type": "object",
"properties": {
"tasks": {
"type": "array",
"items": {
"$ref": "#/definitions/Task"
},
"description": "Worfklow tasks."
},
"name": {
"type": "string",
"description": "The name of the workflow."
},
"parameters": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Optional parameters for the workflow."
},
"schedule": {
"type": "string",
"description": "Optional schedule in cron format."
},
"timezone": {
"type": "string",
"description": "Timezone for the schedule."
}
},
"required": [
"tasks",
"name"
],
"definitions": {
"Task": {
"type": "object",
"properties": {
"input_uri": {
"type": "string",
"description": "The URI of the input file."
},
"runtime_environment_name": {
"type": "string",
"description": "Name of the runtime environment."
},
"runtime_environment_parameters": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Parameters for the runtime environment."
},
"output_formats": {
"type": "array",
"items": {
"type": "string"
}
},
"parameters": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Task-specific parameters."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tags for categorizing the job."
},
"name": {
"type": "string",
"description": "Name of the job."
},
"compute_type": {
"type": "string",
"description": "Type of compute resource to use."
},
"package_input_folder": {
"type": "boolean",
"description": "Whether to package the input folder."
},
"depends_on": {
"type": "array",
"items": {
"type": "string"
},
"description": "DAG node IDs of tasks this task depends on."
},
"node_id": {
"type": "string",
"description": "DAG node ID of this task."
}
},
"required": [
"input_uri",
"name",
"node_id"
]
}
}
}

0 comments on commit 2ce4800

Please sign in to comment.