Closed
Description
What happened:
Trying to parse workflow definition with dataInputSchema defined as an object fails.
{
"id": "greeting",
"version": "1.0.0",
"specVersion": "0.8",
"name": "Greeting Workflow",
"description": "Greet Someone",
"start": "Greet",
"dataInputSchema": {
"schema": {
"title": "Hello World Schema",
"properties": {
"person": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
}
},
"required": [
"person"
]
}
},
"functions": [
{
"name": "greetingFunction",
"operation": "file://myapis/greetingapis.json#greeting"
}
],
"states": [
{
"name": "Greet",
"type": "operation",
"actions": [
{
"functionRef": {
"refName": "greetingFunction",
"arguments": {
"name": "${ .person.name }"
}
},
"actionDataFilter": {
"results": "${ {greeting: .greeting} }"
}
}
],
"end": true
}
]
}
The above dataInputSchema is not accepted because in the code - this is only accepting a string.
What you expected to happen:
As per the spec, the dataInputSchema can be a string or an object. Both should be accepted
How to reproduce it:
Parse the above Workflow definition using sdk-go
Anything else we need to know?:
Environment:
- Go version: go version go1.20.3 darwin/arm64