compojure-api
compojure-api copied to clipboard
:spec path auto-resolution doesn’t work under context
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
thanks for reporting. as discussed on slack, before fixing this, one can add the path manually: :options {:ui {:swagger-docs "/docs/swagger.json"}}