We are adding (swagger) OpenAPI 3 to our Spring application,
We have also Jersey endpoints (using @Path
), and from docs it isn't supported
Does springdoc-openapi support Jersey?
If you are using JAX-RS and as implementation Jersey (@Path for example), we do not support it.
What can we do to expose jersey endpoints? must we move to Spring's @RestController
, or is there jersey support or workaround?
Found a close issue
We only support exposing Rest Endpoints using spring managed beans (
@RestController
for example). You can have a look at swagger-jaxrs2 if it can help:
https://github.com/swagger-api/swagger-samples/tree/2.0/java/java-jersey2-minimal
Solution was to migrate Jersey endpoints to @RestController
.
For example changing:
@ApplicationPath
-> @RequestMapping
@QueryParam
-> @RequestParam
@Path
+ @POST
-> @PostMapping