Skip to content

Combine const and enum handlers #132

@jdesrosiers

Description

@jdesrosiers

Currently if we have multiple const or enum keywords apply to the same location we get multiple error messages.

{
  "allOf": [
    { "enum": ["a", "b", "c"] },
    { "enum": ["a", "b"] },
    { "const": "a" }
  ]
}

We'll multiple messages

  • Expected one of "a", "b", or "c"
  • Expected one of "a" or "b"
  • Expected exactly "a"

Most of this is noise for the user and can be reduced to just,

  • Expected exactly "a"

For this task, I want to combine the error handlers for enum and const and reduce these keywords to a single const or enum message.

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