Made validation sub errors indicate where they come from #138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using anyof or allof in a schema, all of the validation errors for
all of the subschemas are shown in a flat list - all concatenated
together. This makes it very hard (or impossible) to see where in the
schema individual errors come from, and makes it hard to debug the
errors in your json.
This change groups subschema errors together, according to which schema
they appeared under.
I've been testing this on a schema that has an anyOf validation with 6 possible sub schemas. For that the error messages now appear like:
Where before you'd see this: