You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds possibility of validation workflow output in a similar way
that is already done for workflow input
See issue #611
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
Copy file name to clipboardExpand all lines: specification.md
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1769,6 +1769,7 @@ definition "id" must be a constant value.
1769
1769
| version | Workflow version. MUST respect the [semantic versioning](https://semver.org/) format | string | no |
1770
1770
| annotations | List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities | array | no |
1771
1771
| dataInputSchema | Used to validate the workflow data input against a defined JSON Schema| string or object | no |
1772
+
| dataOutputSchema | Used to validate the workflow data output against a defined JSON Schema| string or object | no |
1772
1773
| [constants](#Workflow-Constants) | Workflow constants | string or object | no |
1773
1774
| [secrets](#Workflow-Secrets) | Workflow secrets | string or array | no |
1774
1775
| [start](#Start-Definition) | Workflow start definition | string or object | no |
@@ -1859,9 +1860,18 @@ The `version` property can be used to provide a specific workflow version. It mu
1859
1860
The `annotations` property defines a list of helpful terms describing the workflows intended purpose, subject areas, or other important qualities,
1860
1861
for example "machine learning", "monitoring", "networking", etc
1861
1862
1862
-
The `dataInputSchema` property can be used to validate the workflow data input against a defined JSON Schema.
1863
-
This check should be done before any states are executed. `dataInputSchema` can have two different types.
1864
-
If it is an object type it has the following definition:
1863
+
The `dataInputSchema` and `dataOutputSchema` properties can be used to validate model against a defined JSON Schema.
1864
+
1865
+
The `dataInputSchema` property validates the [workflow data input](#Workflow-Data-Input). Validation should be performed before any states are executed. In case of
1866
+
a starting [Event state](#Event-state), it is not used to validate its event payloads.
1867
+
1868
+
The `dataOutputSchema` property validates the [Workflow data output](#workflow-data-output). Validation should be performed when the process is finished.
1869
+
1870
+
Both properties can be expressed as object or string type.
1871
+
1872
+
If using object type, their `schema` property might be an URI, which points to the JSON schema used to validate the workflow data input, or it might be the JSON schema object. Their `failOnValidationErrors` property determines if workflow execution should continue in case of validation errors. The default value of `failOnValidationErrors` is `true`.
1873
+
1874
+
Example for Json schema reference
1865
1875
1866
1876
```json
1867
1877
"dataInputSchema": {
@@ -1870,11 +1880,10 @@ If it is an object type it has the following definition:
1870
1880
}
1871
1881
```
1872
1882
1873
-
It's `schema` property can be an URI, which points to the JSON schema used to validate the workflow data input, or it can be the JSON schema object.
1874
-
If it's a JSON schema object, it has the following definition:
1883
+
Example for Json schema included in the workflow file
1875
1884
1876
1885
```json
1877
-
"dataInputSchema": {
1886
+
"dataOutputSchema": {
1878
1887
"schema": {
1879
1888
"title": "MyJSONSchema",
1880
1889
"properties":{
@@ -1886,23 +1895,19 @@ If it's a JSON schema object, it has the following definition:
1886
1895
}
1887
1896
}
1888
1897
},
1889
-
"failOnValidationErrors": false
1898
+
"failOnValidationErrors": true
1890
1899
}
1891
1900
1892
1901
```
1893
-
It' `failOnValidationErrors` property determines if workflow execution should continue in case of validation
1894
-
errors. The default value of `failOnValidationErrors` is `true`.
1895
-
If `dataInputSchema` has the string type, it has the following definition:
1902
+
1903
+
If using string type, then the string value is the external schema URI and `failOnValidationErrors` default value of `true` is assumed.
1904
+
1905
+
Example using string type
1896
1906
1897
1907
```json
1898
1908
"dataInputSchema": "URL_to_json_schema"
1899
1909
```
1900
1910
1901
-
In this case the `failOnValidationErrors` default value of `true` is assumed.
1902
-
1903
-
The `dataInputSchema` property validates the [workflow data input](#Workflow-Data-Input). In case of
1904
-
a starting [Event state](#Event-state), it is not used to validate its event payloads.
1905
-
1906
1911
The `secrets` property allows you to use sensitive information such as passwords, OAuth tokens, ssh keys, etc. inside your
0 commit comments