Skip to content

oneOf Schema Violations: filter error message to user's intended candidate schema #92

@tedepstein

Description

@tedepstein

This idea was discussed in #60. There are some cases where an object failed to match one of several candidate schemas, and the error message shows the violations applicable to each of these schemas.

There are some cases where it should be possible to infer a single candidate schema that the user is trying to match. In the example given, if the user has specified a parameter with in : body, then we don't need to report any schema violations that would apply to non-body parameters. The in property acts as a discriminator.

This same optimization can also apply to anyOf violations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions