8000 combined schema (anyOf, allOf, oneOf) error message enhancement · Issue #97 · StackStorm/orquesta · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
combined schema (anyOf, allOf, oneOf) error message enhancement #97
Open
@cognifloyd

Description

@cognifloyd

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0