-
Notifications
You must be signed in to change notification settings - Fork 65
List or object usage in runtime expressions embedded in strings #437
Copy link
Copy link
Open
Description
What/Why/How?
HI All,
I’ve noticed that the expected behavior for runtime expression evaluation, particularly when dealing with lists or objects, is not clearly defined.
Technically, it is possible to produce a Step output in the following form:
steps:
- stepId: get-products
operationId: listOfProducts
outputs:
products: $response.body#/itemsLets consider that response items is a list of objects:
[
{
"name": "item1",
"id": 0
},
{
...
},
]It is also possible to use the Step output as runtime expressions embedded in string,
like in some specification examples:
contentType: application/xml
payload: |
<order>
<items>{$steps.get-products.outputs.products}</items>
</order> contentType: application/x-www-form-urlencoded
payload:
products: {$steps.get-products.outputs.products}
How should we interpret the expression in case when it is a list / list of objects / object ?
Should it be stringified value, or should we throw an error in this case?
Reference
Might be related to #424
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels