The drafter resources contain a modified version of the swagger UI which installs a request interceptor required by the auth0 authentication integration. The swagger UI is configured in drafter.swagger to locate swagger UI resources from the default location on the classpath. This is swagger-uiby default.
The ring-swagger-ui UI dependency puts most of the required resources on the classpath in this location. Both drafter, and the ring-swagger-ui dependency define a swagger-ui/index.html resource. The intention is the drafter version of the resource is the one that is resolved.
In production drafter is run via the drafter-start.sh script. This puts drafter.jar on the classpath after the lib depedencies, so it is likely this is causing the ring-swagger-ui version of index.html to be served instead of the drafter version. This does not contain the required request interceptor and breaks the auth0 integration.
We need to ensure the drafter version of the swagger index.html is loaded in all environments. It may be sufficient to change the java command in drafter-start.sh to put drafter.jar on the classpath first. Another option could be to builld an uberjar where the drafter version of index.html is always chosen via a conflict handler for the swagger-ui/index.html resource path.
The drafter resources contain a modified version of the swagger UI which installs a request interceptor required by the auth0 authentication integration. The swagger UI is configured in drafter.swagger to locate swagger UI resources from the default location on the classpath. This is
swagger-ui
by default.The
ring-swagger-ui
UI dependency puts most of the required resources on the classpath in this location. Both drafter, and thering-swagger-ui
dependency define aswagger-ui/index.html
resource. The intention is the drafter version of the resource is the one that is resolved.In production drafter is run via the drafter-start.sh script. This puts
drafter.jar
on the classpath after the lib depedencies, so it is likely this is causing thering-swagger-ui
version ofindex.html
to be served instead of the drafter version. This does not contain the required request interceptor and breaks the auth0 integration.We need to ensure the drafter version of the swagger
index.html
is loaded in all environments. It may be sufficient to change thejava
command indrafter-start.sh
to putdrafter.jar
on the classpath first. Another option could be to builld an uberjar where the drafter version ofindex.html
is always chosen via a conflict handler for theswagger-ui/index.html
resource path.