filter anyOf and oneOf alternative#180
Open
animeshsahoo1 wants to merge 2 commits intohyperjump-io:mainfrom
Open
filter anyOf and oneOf alternative#180animeshsahoo1 wants to merge 2 commits intohyperjump-io:mainfrom
animeshsahoo1 wants to merge 2 commits intohyperjump-io:mainfrom
Conversation
Author
|
hi @jdesrosiers I have implemented what we discussed about, I tried to not add anything unnecessary but if there is need of changes let me know, I made sure to run the linting and tests as well. |
jdesrosiers
requested changes
Mar 12, 2026
Collaborator
jdesrosiers
left a comment
There was a problem hiding this comment.
Please add tests. They need to cover all the edge cases we discussed and more if you can think of them.
Author
|
I did run it on tests we talk about but I was unsure if I had to add the code for that, I will add it soon. |
Author
|
I have added the test case for matchcount=0 for oneOf and anyOf test cases that were discussed, I tried to think of a failing case but didn't really find any let me know if I could add any other test case |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The anyof and oneof error handlers now filter alternatives based on the instance's properties. For object instances, an alternative is excluded from the error report if none of its declared properties exist on the instance (Rule 1), or if none of the instance's properties pass validation in that alternative (Rule 2). For non-object instances, the original type-keyword filtering is done.
fixes #175