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

Include child in failed validation path when disallowed additional properties are found #102

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

carolynvs
Copy link
Contributor

When it fails validating a child, the error path should be for the child key, not the root.

@Arqu had said that perhaps this fix should target the 2020 spec, but I wasn't sure where that change should be made? Happy to move the fix elsewhere if someone can point me in the right direction.

Fixes #91

When it fails validating a child, the error path should be for the child key, not the root.
@carolynvs carolynvs changed the title Fix path for additional properties validation Include child in failed validation path when disallowed additional properties are found Jun 2, 2021
@Arqu
Copy link
Contributor

Arqu commented Jun 2, 2021

@carolynvs Thanks for the PR will take a look in the next day or two. It's definitely within the scope for JSONSchema and sorry if I wasn't clear enough on the issue. 2019 spec doesn't really give a specific requirement 2020 does. Which leaves the 2019 spec up to us to figure out and I think the ergonomy here is well worth it.

@Arqu Arqu self-requested a review June 2, 2021 19:21
Copy link
Contributor

@Arqu Arqu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, merging :)

Thanks for the effort!

@Arqu Arqu merged commit bc24978 into qri-io:master Jun 3, 2021
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.

Required properties error path does not contain the required property name
2 participants