This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-23
Channels
- # aws (2)
- # beginners (57)
- # boot (63)
- # cider (7)
- # clara (1)
- # cljs-dev (1)
- # cljsrn (5)
- # clojure (68)
- # clojure-brasil (1)
- # clojure-dusseldorf (2)
- # clojure-greece (10)
- # clojure-italy (29)
- # clojure-russia (1)
- # clojure-spec (9)
- # clojure-uk (66)
- # clojurescript (16)
- # cursive (18)
- # datomic (19)
- # docker (3)
- # figwheel (2)
- # fulcro (61)
- # instaparse (7)
- # jobs (1)
- # luminus (5)
- # lumo (47)
- # mount (6)
- # off-topic (13)
- # onyx (39)
- # planck (4)
- # portkey (2)
- # re-frame (28)
- # ring (6)
- # ring-swagger (30)
- # rum (3)
- # shadow-cljs (142)
- # spacemacs (5)
- # sql (2)
- # unrepl (61)
- # untangled (2)
I’m trying to find out what special formatting I can use in the :summary blocks for API methods in Compojure-API? So far I haven’t stumbled across it in the docs…
@staypufd Swagger-UI supports markdown formatting
@petr.mensik I haven’t used wrap-reload
is a long time, but the reloaded-workflow instead where the reset reloads all the routes, so not sure how that works. One thing that could help is to use the subroutes as Vars if they are in different namespaces.
(api
#'users/user-routes)
, with this, the route reference is re-evaluated each time there is a request. Not sure if that works. I recommend the reloaded workflow.another thing, I would use :middleware
option of the api
instead of route-middleware
. e.g.
(api
{:middleware [[wrap-resource resource-root]]}
...)
[metosin/compojure-api "2.0.0-alpha14"]
is out, with a updated version of Muuntaja: the :allow-empty-input?
didn’t work properly causing random nil
on input.
Not sure should we wait for clojure.spec to ship before putting the 2.0.0 out. Has taken 1.5+ year so far…
I think Rich is doing something functional with spec, so everything might break. would like to wait until we see what it looks like before launching.
Thank you, middleware key worked for me.
@petr.mensik yes you can, and should. There is a good example project with all-the-stuff at https://github.com/yogthos/memory-hole
I wrap my handler with json wrappers provided by ring library. But there is no value in body-params.
api
mounts muuntaja.middleware/wrap-formats
, which does json, edn and transit, so you don’t need the ring-json on top of it.
hmm… simplest echo api would be: (api (fn [request] {:status 200, :body (:body-parameters request)}))
np, not a silly q. there is a nice routing guide in Luminus: http://www.luminusweb.net/docs/routes.md