Contributions
Why does the Swagger Gradle plugin only work for JAX-RS?
One thing I don't understand about this plugin is why it only works for classes with JAX-RS annotations, there are swagger specific annotations so why the dependency on JAX-RS? Why not just generate the doc based on the existence of the swagger annotations? Then it would be framework agnostic.327Views0likes0CommentsDoes swagger-gradle-plugin work with Spring MVC? Or only JAX-RS?
I have an existing spring boot application using Swagger 1.5 annotations. The gradle plugin I was using to generate swagger docs no longer works. So I noticed swagger-core now provides a gradle plugin. I see it only supports Swagger 2 annotation so I converted the 1.x annotations to 2.x. That went smoothly. However, no matter what I do all I get is a file whose sole contents is: openapi: 3.0.1 I notice the documentation mentions a lot about JAX-RS and seems to trigger off @PATHor@GET/POST annotations. However, I have spring MVC annotations so don't have JAX-RS annotations. I do however have the swagger 2.0 annotations. So do I have to have JAX-RS annotations before the swagger-gradle-plugin will generate the documentation? I don't want to use springfox, I simply want a static yml file with the api docs in it. EDIT: I tried adding an OpenAPIDefinition annotation to my controller, and that was added to my yml file. So the controller is definitely being examined; however, none of my operations are being added to the generated yml file.1.9KViews0likes2Comments