Add support for processing discriminator property used with allOf property#383
Add support for processing discriminator property used with allOf property#383mladjanm wants to merge 2 commits intoIBM:masterfrom
Conversation
…perty Co-authored-by: Ilija Miljkovic <ilija.miljkovic@asseco-see.rs> Signed-off-by: Mlađan Mihajlović <32955957+mladjanm@users.noreply.github.com>
d653ffb to
ea9469b
Compare
Signed-off-by: Mlađan Mihajlović <32955957+mladjanm@users.noreply.github.com>
|
@mladjanm Wow! This seems like an awesome change! Thank you so much for this PR! I will take a look at this and try to get it in asap. |
|
👍 |
|
Wouldn't a more natural GQL implementation of this be to turn By using union, we're losing some of the information that |
|
Do we have any plan on having this support? |
|
@vigie Yes, on the surface level, that makes sense to me. We just have not implemented this kind of feature. I suppose if all member schemas reference one or more other schemas, then we can create interfaces from all those referenced schemas. I just wonder if there is any kind overlap between union and interface that we need to keep in mind. @TrivialNinja I’m planning on reviewing new and old PRs again this week. |
This pull request introduces support for handling polymorphic schemas in the Open API 3 Specification responses that use the discriminator property with the allOf property to describe polymorphism.
Here is an example situation that this pull request resolves:
In this example an union called
Petwould be created and it would be composed of two types:DogandCat.Fixes #361