Given a Java REST Service implemented with Jersey 3.x, is it possible to generate Swagger 2.0 specs (json or yaml, preferably json though) at build time (that is, no running instance of the server required)?
When still on Jersey 2.x, our method was to use the Maven packages io.swagger:swagger-models
and io.swagger:swagger-core
directly in our Gradle tasks to transform our source code into a Swagger 2.0 spec. These Maven packages seem to have moved to the io.swagger.core.v3
group, and according to their GitHub getting started page it doesn't seem to be possible to use those to generate old Swagger 2.0 specs.
(We know that eventually, moving to Open API 3.0 will be inevitable, but currently this is not an option.)