This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-06
Channels
- # announcements (18)
- # asami (3)
- # aws (10)
- # babashka (47)
- # beginners (343)
- # calva (36)
- # cider (4)
- # clojure (66)
- # clojure-europe (9)
- # clojure-nl (3)
- # clojure-uk (23)
- # clojurescript (30)
- # community-development (69)
- # conjure (1)
- # eastwood (9)
- # events (7)
- # fulcro (81)
- # graalvm (1)
- # malli (5)
- # meander (1)
- # off-topic (41)
- # pathom (15)
- # rdf (1)
- # reitit (6)
- # sci (57)
- # shadow-cljs (18)
- # spacemacs (4)
- # startup-in-a-month (1)
- # testing (2)
- # vim (1)
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.@ordnungswidrig try (m/deref Foo)
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.