We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code blows up with invalid schema:
(defonce registry* (atom (m/default-schemas))) (mr/set-default-registry! (mr/mutable-registry registry*)) (defn sdef "Defines a new schema in mutable [[registry*]]." ([type schema] (swap! registry* assoc type schema) schema) ([type props schema] (swap! registry* assoc type [:schema props schema]) schema)) (sdef ::thing-nested2 int?) (sdef ::thing-nested (mu/optional-keys [:map ::thing-nested2])) (sdef ::thing (mu/optional-keys [:map ::thing-nested])) (mu/update ::thing ::thing-nested (fn [s] (mu/required-keys s [::thing-nested2]))) => ; :malli.core/invalid-schema {:schema nil} ; Evaluation of file malli.clj failed: class clojure.lang.Compiler$CompilerException
schemas should be properly deref'd so that the above code works properly
The text was updated successfully, but these errors were encountered:
I just ran into this and wanted to add the current workaround
from :https://clojurians.slack.com/archives/CLDK6MFMK/p1666794918780899
(mu/update (get @registry* ::thing) ::thing-nested (fn [s] (mu/required-keys s [::thing-nested2])))
or:
(mu/update-in ::thing [0 ::thing-nested] (fn [s] (mu/required-keys s [::thing-nested2])))
Sorry, something went wrong.
No branches or pull requests
The following code blows up with invalid schema:
schemas should be properly deref'd so that the above code works properly
The text was updated successfully, but these errors were encountered: