Fork me on GitHub

Give a definition like

(def Foo [:schema {:registry {"Foo" [:map [:bar pos-int?}  "Foo"])
Is there a way to “resolve” that schema to the actual schema referenced by “Foo”? I want to programatically access the actual definition of “Foo”, e.g. to enumerate the map fields. I’ve look through the properties, options, children and reference of the schema created by (m/schema Foo) but I’m a little lost.


there is also m/deref-all, which peels all top-level RefSchemas.


also, you can always m/walk the schema with option :malli.core/walk-refs, which walks over all refs. Not sure of that one blows up with recursive schemas...


Oh, i had tried ref but not deref.