Closed vise890 closed 4 months ago
Makes sense, PR welcome.
Thank you for the quick reply @ikitommi !
So i put the proposed fix in and ran all the tests, and one unintended consequence is this:
(m/form
(m/schema
[:merge
[:map {:closed true}
[:x :int]]
[:map
[:y :int]]]
{:registry (merge (m/default-schemas)
(mu/schemas))}))
;; => [:merge {:closed true} [:map {:closed true} [:x :int]] [:map [:y :int]]]
;; ^^^^^^^^^^^^^^
Perhaps it's best to leave the form alone, an just rely on m/deref
to get at the properties of the result after all.. I'm happy to close this unless you have another suggestion.
Thank you again, and keep up the amazing work!
don't have other suggestions, let's close this. thanks for your work on this!
I would expect
(:merge malli.util/schemas)
to behave likemalli.util/merge
:This seems to stem from the implementation of into-schema of
malli.util/-util-schema
. Perhaps it could fall back to the merged schema's properties like so:(works, but I'm unsure of the implications)
Tested on malli 0.14.0
Thank you!