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.
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.