GithubHelp home page GithubHelp logo

Comments (4)

czechboy0 avatar czechboy0 commented on June 25, 2024

Hi @hrabkin, can you clarify what you mean by "union"?

You can generate content from two OpenAPI documents into two Swift modules, and if you add accessModifier: package (or public), you can then have a third Swift module that imports the first two, and uses types from both.

Are you writing a client or a server? Can you add more details on what you're trying to do?

from swift-openapi-generator.

czechboy0 avatar czechboy0 commented on June 25, 2024

I'm trying to understand whether this is essentially a duplicate of #132 or if that doesn't work for you for some reason.

from swift-openapi-generator.

hrabkin avatar hrabkin commented on June 25, 2024

No its not a duplicate. Its a different issue, that one not related.

So I have two apis described in openapi yaml: A -> which have some shared components S, and B which uses the same shared components S. I generate two libraries from the yamls and of course there are two duplicate types now AS and BS.

from swift-openapi-generator.

simonjbeaumont avatar simonjbeaumont commented on June 25, 2024

So I have two apis described in openapi yaml: A -> which have some shared components S, and B which uses the same shared components S. I generate two libraries from the yamls and of course there are two duplicate types now AS and BS.

I'm not sure I understand.

If by "two apis" you mean you have two operations in the OpenAPI document that make use of the same type in #/components/schemas, then these will use the same type. Or are you saying you two independent services in the one YAML file?

Would you be able to provide a minimal example to help us understand better?

from swift-openapi-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.