Open jahson opened 1 year ago
I'm not really sure at the moment about what is correct behavior in this case, but resulting map is closed and thus should, probably, remove default key?
(def registry (merge (m/default-schemas) (mu/schemas))) (def Merged (m/schema [:merge [:map [:x :string] [::m/default [:map-of :keyword :any]]] [:map {:closed true} [:y :int]]] {:registry registry})) (m/validate Merged {:x "kikka", :y 6, :z "invalid"}) ; => true
Seems to be related to https://github.com/metosin/malli/pull/871
Good point. Result of merge:
(m/deref Merged) ;[:map {:closed true} ; [:x :string] ; [:y :int] ; [:malli.core/default [:map-of :keyword :any]]]
I'm not really sure at the moment about what is correct behavior in this case, but resulting map is closed and thus should, probably, remove default key?
Seems to be related to https://github.com/metosin/malli/pull/871