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

add more anchor validation tests #724

Closed
wants to merge 1 commit into from

Conversation

gregsdennis
Copy link
Member

@gregsdennis gregsdennis commented Mar 17, 2024

I had a user report that my library isn't checking anchors correctly. Apparently I missed that the allowable characters changed from 2019-09 (and previous) to 2020-12.

This PR adds more tests for anchor validity.

I have updated my implementation and verified these new tests against it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Technically the 2019-09 format is the same for previous versions, but it's in $id instead. I can try to make those changes as well, if desired.

@notEthan
Copy link
Contributor

Over in (unmerged) PR #718 I remove the tests this expands, after discussion in #716, on the basis that it's not really testing anything in particular about $anchor but is just testing the pattern that the meta-schema applies to the value.

@gregsdennis
Copy link
Member Author

Ah, yeah, I remember seeing that.

While I don't disagree with the argument, I hadn't noticed the pattern change, and I feel that this would have caught my error.

@gregsdennis
Copy link
Member Author

I guess we really just need a way to say, "This schema is invalid," which is something that seems to keep coming up.

@gregsdennis
Copy link
Member Author

I'm going to close this in favor of #718. I'll need to add these tests locally.

@gregsdennis gregsdennis deleted the gregsdennis/anchor-validation branch March 18, 2024 22:30
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