Skip to content

[NEED FEEDBACK] Generation of unions for oneOf return types in responses #331

@ftatzky

Description

@ftatzky

Hey guys, first of all amazing library. We use your library at work to generate GraphQL types for our internal Swagger APIs. We have pretty huge schemas at our company and some of them rely on the usage of oneOf for polymorphism in responses.

I created a pull request with my current changes and as you can see in #330 it now correctly generates unions for oneOf responses. It took a lot of effort on my behalf to figure out where to apply even these small changes and now I'm kinda stuck. My changes are probably a bit naive, so I'm reaching out and asking for your help and feedback to get this change into your library. :)

I already tested this change against our internal .yaml which is about 2500 lines and everything was generated without a problem. So I'm pretty confident it's "ok". Still...

What am I probably missing, that could break this? What tests do I have to add if any? I'm really looking forward to your response, because we are in need of that feature to continue using your library.

Thanks in advance and best regards
Flo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions