Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve error reporting for bad/missing discriminator #718

Merged
merged 1 commit into from Dec 19, 2022

Commits on Dec 19, 2022

  1. feat: improve error reporting for bad/missing discriminator

    First, the error messages themselves are better: they give the name of the discriminator property itself,
    which gives the reader a clue where the problem lies. And they give the invalid value when there is one.
    
    Second, using SchemaError rather than errors.New() makes it possible for downstream interpreters to
    add more value to the error.
    gward committed Dec 19, 2022
    Copy the full SHA
    98be931 View commit details
    Browse the repository at this point in the history