compojure-api icon indicating copy to clipboard operation
compojure-api copied to clipboard

:spec path auto-resolution doesn’t work under context

Open pablobcb opened this issue 8 years ago • 1 comments

using swagger-routes under context fails to produce the correct path for swagger.json

(ring/context "/docs" []
    (docs/swagger-routes
     {:ui "/"
      :spec "/swagger.json"
      :data {:info {:title "Bla Bla"
                    :description "Bla Bla"}}}))

produces Can't read swagger JSON from http://localhost:3000/swagger.json

pablobcb avatar Apr 17 '17 17:04 pablobcb

thanks for reporting. as discussed on slack, before fixing this, one can add the path manually: :options {:ui {:swagger-docs "/docs/swagger.json"}}

ikitommi avatar Apr 18 '17 05:04 ikitommi