Fork me on GitHub

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?


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.


Thanks for the tip! It works fine! o/