This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-01
Channels
- # announcements (3)
- # babashka (1)
- # beginners (29)
- # calva (3)
- # cider (5)
- # clojure (17)
- # clojure-europe (9)
- # clojurescript (31)
- # conjure (2)
- # cursive (14)
- # datomic (51)
- # deps-new (4)
- # honeysql (8)
- # introduce-yourself (1)
- # lumo (8)
- # malli (28)
- # missionary (1)
- # off-topic (20)
- # pathom (2)
- # polylith (22)
- # practicalli (10)
- # reagent (3)
- # reitit (6)
- # ring (2)
- # schema (2)
- # shadow-cljs (25)
- # spacemacs (3)
I am trying to match a path parameter ... seems simple but the docs aren't going in tonight 🙂
here is the fragment I'm fiddling with:
["/api"
["/episodes"
{:swagger {:tags ["episodes"]}
:post {:summary "persist data for the episode"
:parameters {:body [:map [:number int?]]}
:responses {200 {:body [:map [:number int?]]}}
:handler (fn [{{{:keys [number]} :body} :parameters}]
(println :number number))}}]
["/episodes/:number"
{:swagger {:tags ["episodes"]}
:get {:summary "fetch data for the episode"
:parameters {:path [:map [:number int?]]}
:responses {200 {:body [:map [:number int?]]}}
:handler (fn [{{{:keys [number]} :path} :parameters}]
(println :number number))}}]]
but I keep getting an ArityException ... which I cannot figure out
any guidance would be welcome as I feel like I'm just missing something silly
[ and yes I'm trying to use malli
to spec the inputs ]