OpenAPI generated documentation served by Jetty fails to resolve
austinb7h opened this issue · 1 comments
Expected Behavior
In Netty, it's possible to expose generated swagger, swagger-ui, rapidoc and redoc at http://localhost:8080/redoc/
, http://localhost:8080/rapidoc/
and http://localhost:8080/swagger-ui/
with the following config:
router:
static-resources:
swagger:
paths: classpath:META-INF/swagger
mapping: /swagger/**
redoc:
paths: classpath:META-INF/swagger/views/redoc
mapping: /redoc/**
rapidoc:
paths: classpath:META-INF/swagger/views/rapidoc
mapping: /rapidoc/**
swagger-ui:
paths: classpath:META-INF/swagger/views/swagger-ui
mapping: /swagger-ui/**
Actual Behaviour
After switching to Jetty, trying to resolve the same endpoints to view the open-api spec at http://localhost:8080/redoc/
, http://localhost:8080/rapidoc/
and http://localhost:8080/swagger-ui/
fails.
Instead, rapidoc intermittently returns redoc, redoc intermittently returns rapidoc and swagger-ui returns a 404.
Note, you can access all the resources correctly if you ignore the mapping, and provide the full path.
e.g. http://localhost:8080/swagger/views/rapidoc/
Steps To Reproduce
Create a Micronaut application generating an OpenAPI spec, and expose the swagger-ui, redoc and rapidoc.
Environment Information
MacOS 14.1.1, Java 17
Example Application
https://github.com/austinb7h/bug-sample
Version
3.1.0