Skip to content

Add full schema pointer matching capability to schema.ValidationErrorMatch() #23

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

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 12, 2020

When a schema validation error is related to one of the logic inversion keywords (not, oneOf), the schema pointer
path provided in the schema validation package's validation results data does not extend past that keyword.

Capability has now been added for the error to be matched against the full JSON pointers under the problematic keywords.

In combination with structuring the schemas in a manner that puts the logic inversion keywords at the lowest possible
level, this makes it possible to fully determine the cause of a validation failure.

@per1234 per1234 force-pushed the per1234/logic-inversion-keyword-pointers branch from 35605dc to 0541ae0 Compare November 12, 2020 13:31
@per1234 per1234 requested a review from a team November 12, 2020 13:32
…Match()

When a schema validation error is related to one of the logic inversion keywords ("not", "oneOf"), the schema pointer
path provided in the schema validation package's validation results data does not extend past that keyword.

Capability has now been added for the error to be matched against the full JSON pointers under the problematic keywords.

In combination with structuring the schemas in a manner that puts the logic inversion keywords at the lowest possible
level, this makes it possible to fully determine the cause of a validation failure.
@per1234 per1234 force-pushed the per1234/logic-inversion-keyword-pointers branch from 0541ae0 to cd34d32 Compare November 12, 2020 14:07
@per1234 per1234 merged commit c474fee into main Nov 12, 2020
@per1234 per1234 deleted the per1234/logic-inversion-keyword-pointers branch November 12, 2020 14:21
@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Sep 29, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants