Open choesang opened 5 years ago
I just saw that the current swagger-maven-plugin is built on swagger 1.5.18. Are there any plans to support the latest swagger 2.0.x ?
Yeah, this would be great to have for us as well! :)
Hello, try to have a look at swagger-maven-plugin
According to the description
provides a maven plugin to resolve an OpenAPI definition at build time (using swagger-jaxrs2).
Update: I have tried right now and it works, I can then display the json in the swagger-ui as well, I am using
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>2.0.6</version>
Small remark, please note that
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.1.7</version>
This plugin is not the one implemented along with the swagger version 2.0.X, check please the groupId
tag.
@blackat I am using Spring REST(not JAX-RS) and trying to generate the OPEN API 3.0 YAML specification file. The swagger-maven-plugin under groupId io.swagger.core.v3 works well for generating the OPEN API definitions, but not reading Operations and Paths annotation as it's not JAX-RS? Is there a workaround to generate OPENAPI 3.0 spec file instead of Swagger 2.0 spec file using com.github.kongchen swagger-maven-plugin?
@devutkarsh It doesn't look like OpenAPI 3.0
is supported yet. Check out https://github.com/kongchen/swagger-maven-plugin/issues/550.
Is there any alternative? since we upgraded our swagger deps, the specs generated are now not working anymore. Operations missing....
After experimenting, I found swagger-maven-plugin this plugin is useful as of now as a replacement.
I hope this helps.
If you're looking for OpenAPI 3.x support, see: https://github.com/kongchen/swagger-maven-plugin/issues/550#issuecomment-2025847025
I am using the following versions of swagger and swagger-maven-plugin. You can see below my configuration and the swagger.json file. It is clearly missing many of the fields defined in the annotation.
Is it possible that the current version of the maven plugin does not support Version 2? Is there any plans to support them in the future?
swagger-maven-plugin 3.1.7 swagger-core 2.0.2
pom.xml
Resource class
swagger.json