This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-21
Channels
- # beginners (38)
- # boot (88)
- # cljs-dev (142)
- # cljsrn (2)
- # clojars (1)
- # clojure (107)
- # clojure-berlin (2)
- # clojure-italy (8)
- # clojure-russia (76)
- # clojure-spec (325)
- # clojure-taiwan (3)
- # clojure-uk (28)
- # clojurescript (80)
- # clojurewest (2)
- # core-async (36)
- # core-logic (1)
- # cursive (21)
- # datomic (16)
- # dirac (18)
- # docs (2)
- # emacs (1)
- # euroclojure (3)
- # garden (3)
- # gsoc (2)
- # hoplon (3)
- # immutant (4)
- # jobs-discuss (16)
- # lein-figwheel (5)
- # liberator (17)
- # lumo (19)
- # off-topic (2)
- # om (20)
- # onyx (28)
- # pedestal (50)
- # planck (4)
- # re-frame (5)
- # reagent (3)
- # ring-swagger (13)
- # spacemacs (1)
- # specter (43)
- # testing (3)
- # timbre (3)
- # uncomplicate (1)
- # vim (2)
- # yada (4)
I would like to do something like this: https://github.com/metosin/compojure-api/issues/42
(defroutes inc-route (GET "/inc" [x] :query-params [x :- s/Int] :return {:result s/Int} (ok {:result (inc x)})))
That's weird. But you can use just def
here. x
doesn't need to be set in the brackets. If it still doesn't work, please write an issue. Haven't seen that with versions 1.0.0+
is it possible to define which headers are necessary for a specific route/context? im searching the docs but cant find anything
somethinglike
:headers {"authorization" s/str}
yep! check out this example: https://github.com/metosin/compojure-api/wiki/Swagger-integration#sample-documented-endpoint replacing :query-params
with :header-params