Skip to content

Commit 2c38baf

Browse files
authored
Merge pull request #907 from neuroglia-io/fix-input-output-export-schema
Fixes the schema to allow `input.from`, `output.as` and `export.as` to be either a runtime expression string or object
2 parents c85c1b4 + 4c96168 commit 2c38baf

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

dsl-reference.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,8 +1502,7 @@ When set, runtimes must validate output data against the defined schema, unless
15021502
| Property | Type | Required | Description |
15031503
|----------|:----:|:--------:|-------------|
15041504
| schema | [`schema`](#schema) | `no` | The [`schema`](#schema) used to describe and validate output data.<br>*Even though the schema is not required, it is strongly encouraged to document it, whenever feasible.* |
1505-
| from | `string`<br>`object` | `no` | A [runtime expression](#runtime-expressions), if any, used to filter and/or mutate the workflow/task output. |
1506-
| to | `string`<br>`object` | `no` | A [runtime expression](#runtime-expressions), if any, used to update the context, using both output and context data. |
1505+
| as | `string`<br>`object` | `no` | A [runtime expression](#runtime-expressions), if any, used to filter and/or mutate the workflow/task output. |
15071506

15081507
#### Examples
15091508

schema/workflow.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,9 @@ $defs:
899899
$ref: '#/$defs/schema'
900900
description: The schema used to describe and validate the input of the workflow or task.
901901
from:
902-
type: string
902+
oneOf:
903+
- type: string
904+
- type: object
903905
description: A runtime expression, if any, used to mutate and/or filter the input of the workflow or task.
904906
description: Configures the input of a workflow or task.
905907
output:
@@ -909,7 +911,9 @@ $defs:
909911
$ref: '#/$defs/schema'
910912
description: The schema used to describe and validate the output of the workflow or task.
911913
as:
912-
type: string
914+
oneOf:
915+
- type: string
916+
- type: object
913917
description: A runtime expression, if any, used to mutate and/or filter the output of the workflow or task.
914918
description: Configures the output of a workflow or task.
915919
export:
@@ -919,7 +923,9 @@ $defs:
919923
$ref: '#/$defs/schema'
920924
description: The schema used to describe and validate the workflow context.
921925
as:
922-
type: string
926+
oneOf:
927+
- type: string
928+
- type: object
923929
description: A runtime expression, if any, used to export the output data to the context.
924930
description: Set the content of the context.
925931
retryPolicy:

0 commit comments

Comments
 (0)