This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-17
Channels
- # bangalore-clj (2)
- # beginners (202)
- # boot (18)
- # cljs-dev (8)
- # cljsjs (7)
- # cljsrn (4)
- # clojars (2)
- # clojure (401)
- # clojure-boston (2)
- # clojure-dusseldorf (1)
- # clojure-gamedev (36)
- # clojure-greece (2)
- # clojure-italy (1)
- # clojure-russia (16)
- # clojure-spec (27)
- # clojure-uk (7)
- # clojurescript (68)
- # core-async (16)
- # cursive (25)
- # datascript (1)
- # datomic (34)
- # funcool (1)
- # hoplon (1)
- # interop (1)
- # klipse (1)
- # leiningen (2)
- # lumo (75)
- # off-topic (17)
- # om-next (2)
- # onyx (66)
- # re-frame (18)
- # reagent (2)
- # ring-swagger (11)
- # spacemacs (1)
- # specter (1)
- # timbre (3)
- # untangled (48)
- # yada (7)
by reading the docs im not so sure how to do it, here is my attempt
(ring/context
"/docs" []
;:middleware [authorized-for-docs?]
(docs/swagger-routes
{:ui "/"
;:spec "/swagger.json"
:data {:info {:title "Bla Bla"
:description "Bla Bla Bla Bla Bla o Bla"}}}))
ok… swagger.json
path auto-resolution doesn’t work if it’s under a context
. I think It should (all the reverse path info should be available), but it doesn’t seem to be implemented.
well, it can be set manually:
(context "/docs" []
(docs/swagger-routes
{:ui "/"
:options {:ui {:swagger-docs "/docs/swagger.json"}}
:spec "/swagger.json"
:data {:info {:title "Bla Bla"
:description "Bla Bla Bla Bla Bla o Bla"}}}))
e.g. one can set all the possible options via the swagger-routes, which is kinda nice.
also those that effect the swagger-ui itself, for example adding {:options {:ui {:jsonEdit true}}}
will cause all the body text-boxes to be rendered as forms.
here’s the full list of swagger-ui parameters: http://swagger.io/docs/swagger-tools/#customization-36