Fork me on GitHub
Maciej Falski15:11:35

Hey, I think I found a bug while trying to get malli coercion working with reitit. Basically it comes to this:

; based on  example
(def Over6
    {:type :user/over6
     :pred #(and (int? %) (> % 6))
     :type-properties {:error/message "should be over 6"
                       :decode/string mt/-string->long
                       :json-schema/type "integer"
                       :json-schema/format "int64"
                       :json-schema/minimum 6
                       :gen/gen (gen/large-integer* {:min 7})}}))

(mu/closed-schema Over6)

=> #'user/Over6
Execution error (ExceptionInfo) at malli.core/-fail! (core.cljc:79).
:malli.core/invalid-schema {:schema :user/over6}
I can raise an issue in GH if you can confirm it.