This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-30
Channels
- # bangalore-clj (1)
- # beginners (23)
- # boot (1)
- # cider (23)
- # cljsjs (2)
- # cljsrn (4)
- # clojure (251)
- # clojure-dusseldorf (2)
- # clojure-gamedev (23)
- # clojure-italy (5)
- # clojure-russia (53)
- # clojure-sanfrancisco (5)
- # clojure-spec (7)
- # clojure-uk (66)
- # clojurescript (169)
- # community-development (21)
- # core-async (10)
- # cursive (15)
- # data-science (1)
- # datomic (7)
- # docker (1)
- # emacs (24)
- # events (1)
- # funcool (6)
- # hoplon (24)
- # liberator (1)
- # luminus (6)
- # lumo (62)
- # mount (7)
- # off-topic (1)
- # om (12)
- # om-next (5)
- # onyx (14)
- # overtone (2)
- # pedestal (58)
- # powderkeg (27)
- # protorepl (1)
- # re-frame (1)
- # ring-swagger (16)
- # rum (51)
- # spacemacs (25)
- # uncomplicate (7)
- # unrepl (22)
- # untangled (7)
- # yada (109)
Is it possible to add more general documentation about your API somewhere in swagger-ui?
Not belonging to one specific endpoint. E.g. I made an optional key in every endpoint that enables to transform the response before it’s sent to the client.
example here: https://github.com/metosin/compojure-api/blob/master/examples/thingie/src/examples/thingie.clj#L27-L50
I’m trying to add some middleware to my api, and I’m not quite sure how to do it…this is what I have so far
(api/api
{:middleware [#(friend/wrap-authorize % #{"user"})]
:swagger
{:ui "/api-docs"
:spec "/swagger.json"
:data {:info {:title "Cenx Topology API"
:description "REST API for topology data"}
:tags [....]}}}
(api/context "/api" []
(api/context "..." []
...)))
I’ll do a bit more digging to see if I can apply middleware to all the routes defined in the API
ok so this seems to be working
(api/middleware
[#(friend/wrap-authorize % #{"user"})]
…