-
-
Notifications
You must be signed in to change notification settings - Fork 32
Validate oneOf, anyOf and allOf with discriminator #30
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
Validate oneOf, anyOf and allOf with discriminator #30
Conversation
d4bd56e
to
8c47c3c
Compare
Hi @p1c2u, I implemented a minimal handling of the Were you already working on that feature? |
Codecov Report
@@ Coverage Diff @@
## master #30 +/- ##
==========================================
+ Coverage 67.19% 70.31% +3.12%
==========================================
Files 6 6
Lines 189 219 +30
Branches 40 45 +5
==========================================
+ Hits 127 154 +27
- Misses 50 53 +3
Partials 12 12
Continue to review full report at Codecov.
|
@gberaudo I didn't work on the feature and your approach looks very nice and promising. |
- handle implicit refs and missing "mapping"; - test all 3 cases.
Hi @p1c2u, thanks for your encouraging words. I have continued work on this PR; it now handles implicit references and was extented to support also anyOf and allOf (which are actually identical). I think it handles all cases described in https://swagger.io/specification/#discriminator-object. |
Validate oneOf, anyOf and allOf with discriminator
Related to: #29.
Implement discriminator support.
Todo:
oneOf
andanyOf
;allOf
?