Closed dvingo closed 1 year ago
This doesn't look correct:
(let [opts {:registry {:map (m/-map-schema)
:int (m/-int-schema)
::test :map
::test-2 [:map [:x :int]]}}]
(m/schema [::test-2] opts)) ;=> :map
I don't think it should be ok to use the vector syntax in the first position (a schema type), e.g. this doesn't make much sense:
(let [opts {:registry {:map (m/-map-schema)
:int (m/-int-schema)
::test :map
::test-2 [:map [:x :int]]}}]
(m/schema [::test-2 {:kikka "kukka"}] opts))
;; ... that would be:
[[:map [:x :int]] {:kikka "kukka"}]
ahh, thanks for the feedback! I understand now and agree doing this will lead to other problems, I can use other strategies to get the behavior I want.
Addresses https://github.com/metosin/malli/issues/847
Unwrap schemas in vector form for subsequent schema lookups.