在 OpenAPI 3 中支持 Jersey

Support Jersey in OpenAPI 3

我们正在向我们的 Spring 应用程序添加(招摇)OpenAPI 3,

我们也有 Jersey 端点(使用 @Path),从 docs 开始不支持

Does springdoc-openapi support Jersey?

If you are using JAX-RS and as implementation Jersey (@Path for example), we do not support it.

我们可以做些什么来公开球衣端点?我们必须转到 Spring 的 @RestController,还是有球衣支持或解决方法?

找到收盘价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

解决方案是将 Jersey 端点迁移到 @RestController

例如更改:

@ApplicationPath -> @RequestMapping

@QueryParam -> @RequestParam

@Path + @POST -> @PostMapping