metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.44k stars 205 forks source link

Fail when map schema is missing a type for a key #864

Closed tvaisanen closed 1 year ago

tvaisanen commented 1 year ago

Fixes issue #860

Invalid entries should not be accepted.

For example the following should fail.

(malli.core/schema [:map [:foo]])
;; => :map

The issue was that malli.core/-eager-entry-parser's loop iterator was not incremented properly when given entry such as [:foo]. This was caused by malli.core/-parse-entry returning the same iterator i value that it was given.

Fail instead of "skipping" the entry.