Skip to content

Commit 4e7f93d

Browse files
committed
Tiho's comment
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
1 parent 6805134 commit 4e7f93d

File tree

2 files changed

+42
-74
lines changed

2 files changed

+42
-74
lines changed

schema/workflow.json

Lines changed: 40 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -39,80 +39,10 @@
3939
"additionalItems": false
4040
},
4141
"inputDataSchema": {
42-
"oneOf": [
43-
{
44-
"type": "string",
45-
"description": "URI of the JSON Schema used to validate the workflow data input",
46-
"minLength": 1
47-
},
48-
{
49-
"type": "object",
50-
"description": "Workflow data input schema definition",
51-
"properties": {
52-
"schema": {
53-
"oneof": [
54-
{
55-
"type": "string",
56-
"description": "URI of the JSON Schema used to validate the workflow data input",
57-
"minLength": 1
58-
},
59-
{
60-
"type": "object",
61-
"description": "The JSON Schema object used to validate the workflow data input",
62-
"$schema": "http://json-schema.org/draft-07/schema#"
63-
}
64-
]
65-
},
66-
"failOnValidationErrors": {
67-
"type": "boolean",
68-
"default": true,
69-
"description": "Determines if workflow execution should continue if there are validation errors"
70-
}
71-
},
72-
"additionalProperties": false,
73-
"required": [
74-
"schema"
75-
]
76-
}
77-
]
42+
"$ref": "#/definitions/validationSchema"
7843
},
7944
"outputDataSchema": {
80-
"oneOf": [
81-
{
82-
"type": "string",
83-
"description": "URI of the JSON Schema used to validate the workflow data output",
84-
"minLength": 1
85-
},
86-
{
87-
"type": "object",
88-
"description": "Workflow data output schema definition",
89-
"properties": {
90-
"schema": {
91-
"oneof":[
92-
{
93-
"type": "string",
94-
"description": "URI of the JSON Schema used to validate the workflow data output",
95-
"minLength": 1
96-
},
97-
{
98-
"type": "object",
99-
"description": "The JSON Schema object used to validate the workflow data output",
100-
"$schema": "http://json-schema.org/draft-07/schema#"
101-
}
102-
]
103-
},
104-
"failOnValidationErrors": {
105-
"type": "boolean",
106-
"default": true,
107-
"description": "Determines if an exception should be thrown when the output model does not match the provided schema"
108-
}
109-
},
110-
"additionalProperties": false,
111-
"required": [
112-
"schema"
113-
]
114-
}
115-
]
45+
"$ref": "#/definitions/validationSchema"
11646
},
11747
"secrets": {
11848
"$ref": "secrets.json#/secrets"
@@ -1937,6 +1867,44 @@
19371867
},
19381868
"additionalProperties": false,
19391869
"required": []
1870+
},
1871+
"validationSchema" : {
1872+
"oneOf": [
1873+
{
1874+
"type": "string",
1875+
"description": "URI of the JSON Schema used to validate the workflow",
1876+
"minLength": 1
1877+
},
1878+
{
1879+
"type": "object",
1880+
"description": "Workflow data input schema definition",
1881+
"properties": {
1882+
"schema": {
1883+
"oneof":[
1884+
{
1885+
"type": "string",
1886+
"description": "URI of the JSON Schema used to validate the workflow",
1887+
"minLength": 1
1888+
},
1889+
{
1890+
"type": "object",
1891+
"description": "The JSON Schema object used to validate the workflow",
1892+
"$schema": "http://json-schema.org/draft-07/schema#"
1893+
}
1894+
]
1895+
},
1896+
"failOnValidationErrors": {
1897+
"type": "boolean",
1898+
"default": true,
1899+
"description": "Determines if error should be thrown if there are validation errors"
1900+
}
1901+
},
1902+
"additionalProperties": false,
1903+
"required": [
1904+
"schema"
1905+
]
1906+
}
1907+
]
19401908
}
19411909
}
19421910
}

specification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,7 +1878,7 @@ Example for Json schema reference
18781878

18791879
```json
18801880
"inputDataSchema": {
1881-
"schema": "URL_to_json_schema",
1881+
"schema": "URI_to_json_schema",
18821882
"failOnValidationErrors": false
18831883
}
18841884
```
@@ -1908,7 +1908,7 @@ If using string type, then the string value is the external schema URI and `fail
19081908
Example using string type
19091909

19101910
```json
1911-
"inputDataSchema": "URL_to_json_schema"
1911+
"inputDataSchema": "URI_to_json_schema"
19121912
```
19131913

19141914
The `secrets` property allows you to use sensitive information such as passwords, OAuth tokens, ssh keys, etc. inside your

0 commit comments

Comments
 (0)