@OpenAPIDefinition does not respect application context path

242 views
Skip to first unread message

Moritz Becker

unread,
Jan 15, 2018, 7:29:53 AM1/15/18
to Swagger
Hello,

I am using swagger-jaxrs2:2.0.0-rc3 in my web application to generate an openapi spec which is consumed by swagger-ui v3.9.0 contained in the same deployment.
Locally, my application is deployed at context path /my-app.
Relative server urls in the @OpenAPIDefinition seem to not respect the context path of the application. Thus I have to annotate my resources with
@OpenAPIDefinition(servers = @Server(url = "/my-app"))
restating the context path explicitely.

However, this breaks as soon as I deploy my app behind a reverse proxy that changes the context path.
I wonder if this is a bug and if not, what is the suggested approach to get this working?

Thank you.

Kevin O'Neal

unread,
Jul 26, 2018, 12:17:55 PM7/26/18
to Swagger
I'm experiencing the same issue with version 2.0.2.
Reply all
Reply to author
Forward
0 new messages