This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-04
Channels
- # aleph (8)
- # aws (14)
- # babashka (37)
- # beginners (30)
- # calva (5)
- # cider (4)
- # clj-kondo (21)
- # cljsrn (4)
- # clojure (234)
- # clojure-denmark (1)
- # clojure-europe (10)
- # clojure-france (10)
- # clojure-italy (4)
- # clojure-nl (17)
- # clojure-sanfrancisco (1)
- # clojure-spec (8)
- # clojure-uk (44)
- # clojurescript (20)
- # cursive (9)
- # datascript (2)
- # datomic (5)
- # emacs (9)
- # fulcro (50)
- # graalvm (32)
- # jackdaw (18)
- # leiningen (1)
- # malli (10)
- # meander (10)
- # nrepl (10)
- # off-topic (15)
- # pathom (20)
- # re-frame (14)
- # reagent (37)
- # reitit (7)
- # ring (1)
- # shadow-cljs (102)
- # test-check (6)
- # tree-sitter (15)
- # vim (4)
- # xtdb (2)
- # yada (1)
Hi, @ikitommi I was implementing a handler to process a type decimal
and it returned an error saying that could not coerce the value. I remember that I sent a PR to help with this issue in spec-tools
however, when I was looking at my toy-example, it used {:parameters {:form ::decimal-var?}}
and now this new code is using {:parameters {:body ::decimal-vars?}}
when I changed to :form
it worked just fine! Could you point to where I can trace down the differences between :form
and :body
in reitit coercion?
https://github.com/metosin/reitit/blob/master/modules/reitit-core/src/reitit/coercion.cljc#L39-L40ere’s the differentiator: https://github.com/metosin/reitit/blob/master/modules/reitit-core/src/reitit/coercion.cljc#L39-L40
e.g. form is always converterd from strings, body from the json, edn etc, which might have a different transformer used.
Thanks! I'm in a hurry right now, but I will investigate this more carefully probably this weekend (Y)
I need anything special to swagger enable the input box for path-parameters?
(s/def ::produto spt/string?)
(def product-routes
["/product/:produto" {:get {:summary "what is your configuration?"
:parameters {:path-params (s/keys :req-un [::produto])}
:handler (fn [req]
(println req)
{:status 200
:body "ok"})}}])
this is my current handler@UBSREKQ5Q it should be {:parameters {:path …}}
. I recommned enabling the spec & spell checking on, it will warn about invalid keys at router creation time.