Closed jsyrjala closed 10 years ago
I took a look at code, some related locations:
https://github.com/metosin/compojure-api/blob/master/src/compojure/api/swagger.clj#L141 https://github.com/metosin/compojure-api/blob/master/src/compojure/api/swagger.clj#L124 https://github.com/metosin/ring-swagger/blob/master/src/ring/swagger/core.clj#L209 https://github.com/ring-clojure/ring/blob/master/ring-servlet/src/ring/util/servlet.clj#L63
Hi.
thanks for investigating. As you seem to have both the skills and interest to solve this, feel free to do a PR or send me a code snippet which fixed this :) This could help to check the required extra param for base paths under the legacy app server:
(GET* "/echo" req (ok (dissoc req :body)))
btw: https://groups.google.com/forum/#!topic/ring-clojure/AK4xdFOm0Qo
updates examples, there is now the new echo-endpoints to demo stuff.
works.
lein ring uberwar
sudo cp target/examples.jar /var/lib/tomcat/webapps/examples.war
http://localhost:18080/examples/api/pizzas
=> works as expectedhttp://localhost:18080/examples/
=> redirects tohttp://localhost:18080/index.html
. Should redirect tohttp://localhost:18080/examples/index.html
http://localhost:18080/examples/index.html
(this is the correct URL), there is errorCan't read swagger JSON from http://localhost:18080/api/api-docs
When war is deployed as a root war (that is, contextPath is '/') everything works.
Some component (swagger-ui?) should include contextPath to generated URLs.