Closed stig closed 8 months ago
With Reitit (0.7.0-alpha7), using the below route definition, I get a failure during the coercion when passing the uri "http://example.com".
["/uri" {:post {:summary "Post a URI - fails coercion" :coercion reitit.coercion.malli/coercion :parameters {:body {:uri uri?}} :responses {200 {:body {:uri uri?}}} :handler (fn [{{{uri :uri} :body} :parameters}] {:status 200 :body {:uri uri}})}}]]
When I replaced the :coercion with the Clojure Spec version, the coercion works.
With this change the Malli coercer should also work.
I made it Clojure specific since it relies on java.net.URI.
java.net.URI
good catch re: babashka!
With Reitit (0.7.0-alpha7), using the below route definition, I get a failure during the coercion when passing the uri "http://example.com".
When I replaced the :coercion with the Clojure Spec version, the coercion works.
With this change the Malli coercer should also work.
I made it Clojure specific since it relies on
java.net.URI
.