Fork me on GitHub
#ring-swagger
<
2017-11-09
>
petr.mensik19:11:29

Sorry for silly question but may I ask why am I getting java.lang.ClassNotFoundException: ring.middleware.format-params when I have included dependencies for both [metosin/compojure-api "2.0.0-alpha12"] and [ring-middleware-format "0.7.2"]. I am want to serve both API and static resources following this tutorial https://github.com/metosin/compojure-api/wiki/Serving-static-resources

petr.mensik19:11:35

Code then looks like this

(defapi app
  :middleware [ring.middleware.format-params/wrap-restful-params
               ring.middleware.format-response/wrap-restful-response
               wrap-public-resource]
  api-config
  (context "/api" []
    api-routes-calendar
    api-routes-campaigns
    api-routes-companies
    api-routes-contacts
    api-routes-files
    api-routes-reports
    api-routes-tags
    api-routes-tasks
    api-routes-users)
  (undocumented app-routes ; static content
                  not-found-routes)) ; 404

petr.mensik19:11:51

Currently this works both for API and static content if I comment out ring format. However localhost:3000/docs (name of the docs) returns the 404 not-found-route