-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for uri? in malli.transform (Clojure only)
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`.
- Loading branch information
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters