Skip to content

Conversation

@ouvreboite
Copy link
Contributor

@ouvreboite ouvreboite commented Apr 12, 2024

Hi there. A very small PR that would greatly improve how I can post-process validation errors 🙂

Exposing the JToken that failed the error will allow NJsonSchema users to access various information, including the actual content of the failed token.

For example, when you have a "StringExpected" error, you can quickly access ValidationError.Token to see what is the actual value that is not a string. Especially handy for investigating non-nullable field that received a null value.

Exposing the JToken that failed the error will allow NJsonSchema to better leverage validation errors by accessing the value that failed the schema.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants