Skip to content

Commit

Permalink
Improve native workflow JSON schema
Browse files Browse the repository at this point in the history
Fix some types and add example documentation for `a_galaxy_workflow` property
  • Loading branch information
davelopez committed Apr 3, 2022
1 parent 8abe4f9 commit 5ef6ece
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions workflow-languages/schemas/native.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"type": "object",
"properties": {
"a_galaxy_workflow": {
"type": "string"
"type": "string",
"title": "## Galaxy Workflow indicator",
"markdownDescription": "Indicates that this JSON document is a **Galaxy Workflow**",
"default": "true",
"enum": [
"true"
]
},
"annotation": {
"type": "string"
Expand Down Expand Up @@ -47,7 +53,7 @@
},
"steps": {
"type": "object",
"$ref": "#/definitions/stepDef"
"$ref": "#/definitions/step"
},
"tags": {
"type": "array",
Expand Down Expand Up @@ -77,17 +83,18 @@
"uuid"
],
"definitions": {
"stepDef": {
"step": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"[0-9]*": {
"^[0-9]*$": {
"type": "object",
"properties": {
"annotation": {
"type": "string"
},
"content_id": {
"type": "string"
"$ref": "#/definitions/optionalString"
},
"errors": {
"type": "null"
Expand Down Expand Up @@ -119,7 +126,7 @@
]
},
"label": {
"type": "string"
"$ref": "#/definitions/optionalString"
},
"name": {
"type": "string"
Expand Down Expand Up @@ -158,13 +165,13 @@
}
},
"tool_id": {
"type": "null"
"$ref": "#/definitions/optionalString"
},
"tool_state": {
"type": "string"
},
"tool_version": {
"type": "null"
"$ref": "#/definitions/optionalString"
},
"type": {
"type": "string"
Expand All @@ -179,22 +186,25 @@
},
"required": [
"annotation",
"content_id",
"id",
"input_connections",
"inputs",
"name",
"outputs",
"position",
"tool_id",
"tool_state",
"tool_version",
"type",
"uuid",
"workflow_outputs"
]
}
}
},
"optionalString": {
"type": [
"string",
"null"
]
}
}
}

0 comments on commit 5ef6ece

Please sign in to comment.