-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[REQ] [Java] [Maven] InputSpec download from url #2241
Comments
I think the input parameter (-i in CLI or inputSpec in plugins) already supports URL. Can you try this one? |
@wing328 he is referring to the maven-plugin. I will give it a look. |
+1 for https/http supporting I am using maven plugin for some kind of automatic CI process. |
That's a very important feature. APIs are usually published on a web server and you don't want to download it just to generate the code! |
There's a work-in-progress PR: #2373 Please help test it when you guys have time. |
Has this been implemented? |
It seems like it has: #3826 |
What about implementation for Gradle plugin? |
Looks like it is still not working for redirects: http://petstore.swagger.io/v2/swagger.json |
Is it still open? :( It would be so nice feature to use shared api specification between multiple services! |
There is an example which works with remote URL: openapi-generator/modules/openapi-generator-maven-plugin/examples/java-client.xml Line 51 in 8938f9d
Maybe you are limited to collapsed ApiSpec. |
Currently inputSpec must be a file located in the filesystem.
It would be nice to provide an uri like "file:///..." or "http://..." and the maven plugins decides whether it should download the file first or not.
Usually to wanna generate sources for a public service providing a swagger.json file somewhere.
Changes could happen here: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java#L383
The text was updated successfully, but these errors were encountered: