-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
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
Malli coercion incorrectly rejects [:or [:map ...] [:map ...]] #407
Labels
Comments
Minimal repro: (m/decode
[:or
[:map [:x int?]]
[:map [:y keyword?]]]
{:x 1}
mt/strip-extra-keys-transformer)
; => {} I think we need to check validity on transformation |
should be fixed in |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I specify that a POST or PUT body should conform to either of two
:map
schemata, the malli coercion middleware incorrectly rejects both.Working from the
ring-malli-swagger
example, with this patch:In the repl, I can see that both maps are accepted by
malli.core/validate
, as I expect:However, if I POST, I get a 400 response:
The text was updated successfully, but these errors were encountered: