reitit icon indicating copy to clipboard operation
reitit copied to clipboard

Incorrect coercion for alternatives of closed maps with optional keys

Open gyk opened this issue 1 year ago • 0 comments

Similar to #407, except that the maps are closed and contain optional keys. For example,

(malli.core/decode
  [:or
   [:map
    {:closed true}
    [:x {:optional true} int?]]
   [:map
    {:closed true}
    [:y {:optional true} keyword?]]]
  {:y :foo}
  malli.transform/strip-extra-keys-transformer)

should return {:y :foo} but actually returns {}.

gyk avatar Jul 20 '23 03:07 gyk