Skip to content

How do we present errors when the error is that the schema(s) passed? #120

@jdesrosiers

Description

@jdesrosiers

The oneOf keyword fails if more than one of the alternatives passes. Right now, the best we can do is tell the user that more than one of the schemas failed, but that's not terribly helpful. The user shouldn't have to go look at the schema to figure out what was wrong.

We have the same problem when not and contains.

In our first draft of this library, we were working on creating a description of what a schema describes. We could use something like that to create a message of some kind. The biggest problem with that approach is that schemas could easily get too complex for that to be feasible. I'll try to share some more examples later to help think about the problem.

What do you think? What strategies can we use to present meaningful error messages in these situations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions