Coder Social home page Coder Social logo

Comments (8)

jsfrench avatar jsfrench commented on June 16, 2024 3

Nobody asked for it till now!
Should be fairly straightforward to add support for this.

from swaggerhub-maven-plugin.

octmueller avatar octmueller commented on June 16, 2024 1

👍

We would like to do some openapi validation on incoming requests. We don't want to connect online to swaggerhub in order to retrieve the spec plus all references.

SwaggerParser provides some nice functionality in order to facilitate this: dereference and bundle.

Maybe this plugin could use that and provide an option to have the downloaded file completely dereferenced or bundled into one big file. Otherwise you'd probably have to tweak the $ref uris, I imagine.

from swaggerhub-maven-plugin.

jsfrench avatar jsfrench commented on June 16, 2024

Could you describe your use case @batwad?

from swaggerhub-maven-plugin.

batwad avatar batwad commented on June 16, 2024

Could you describe your use case @batwad?

This is so I can have an offline copy of the APIs in sync with whatever's in swaggerhub.

I have a build process at the moment which uses the codegen plugin, but it means the code can't be built if swaggerhub is down (which never happens of course) or a dev is working offline. I want to build a separate build that will download the APIs and push them to our on-prem git repo, a poor man's version of your git sync integration if you like.

from swaggerhub-maven-plugin.

jsfrench avatar jsfrench commented on June 16, 2024

Ok, gotcha.

Yeah I think you're right @octmueller, it looks like SwaggerParser/OpenAPIParser is probably the way to go here. Maybe add an optional boolean <resolve> parameter to the plugin config.

from swaggerhub-maven-plugin.

batwad avatar batwad commented on June 16, 2024

I was hoping that a relative address would work in a $ref, thereby avoiding the problem @octmueller mentioned. But downloading a resolved version of the API would be even better.

Still, I'd like the ability to download domains so that I can mirror them in our SCM.

from swaggerhub-maven-plugin.

VictorKrapivin avatar VictorKrapivin commented on June 16, 2024

Yes, it would be great to download resolved version of api with models included from domains

from swaggerhub-maven-plugin.

hkosova avatar hkosova commented on June 16, 2024

v. 1.0.8 now supports downloading and uploading domains. Use the <definitionType>domain</definitionType> configuration parameter to indicate that the target file is a domain.

from swaggerhub-maven-plugin.

Related Issues (18)

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.