-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: V.oneOf
reports all results in case of error + fixed cycle detection
#130
Merged
Conversation
This file contains 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
Signed-off-by: Samppa Saarela <samppa.saarela@iki.fi>
…ection Fix `V.oneOf` with multiple object validators failing because of broken cycle detection. This fix makes cycle detection validator (instance) specific. While it may produce funny results with cyclic data, it will be more natural for more common use-cases of `V.oneOf`, `V.allOf` and `V.anyOf`. Signed-off-by: Samppa Saarela <samppa.saarela@iki.fi>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #130 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 19 19
Lines 4312 4346 +34
Branches 676 688 +12
=========================================
+ Hits 4312 4346 +34
|
Signed-off-by: Samppa Saarela <samppa.saarela@iki.fi>
ssaarela
force-pushed
the
f/fix-one-of
branch
from
January 30, 2025 14:37
46bd7a7
to
d398807
Compare
hyvonenjjp
approved these changes
Jan 31, 2025
karlkeskyla
reviewed
Jan 31, 2025
karlkeskyla
approved these changes
Jan 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
Added a small idea/suggestion to be considered. Approved!
Signed-off-by: Samppa Saarela <samppa.saarela@iki.fi>
Signed-off-by: Samppa Saarela <samppa.saarela@iki.fi>
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.
V.oneOf
can handle multiple ObjectValidator alternatives.V.oneOf
reports all ValidationResults in case of error