Open
Description
I think this goes here, but if it goes on StackStorm/st2, I can file the issue there.
This issue is about improving the error message returned when a schema validation error occurs due to not matching a oneOf
schema.
I ran an orquesta workflow and for the task transition I used the incorrect:
publish:
message: foobar
instead of the correct:
publish:
- message: foobar
Doing that gave me an error message like:
{
"spec_path": "tasks.validate_input.next[0].publish",
"message": "{'error_message': 'wrong format for input param foobar: {{ ctx().foobar }}'} is not valid under any of the given schemas",
"type": "syntax",
"schema_path": "properties.tasks.patternProperties.^\\w+$.properties.next.items.properties.publish.oneOf"
},
Then, I went to look up the schema to figure out what I did wrong, mistakenly guessing that it didn't like my use of Jinja. My error was passing in a dict instead of an array. Could the error message be improved to say what the options are when the schemaPath is oneOf
? (in this case string or array of unique one item dicts)