This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-14
Channels
- # announcements (10)
- # architecture (3)
- # atom-editor (1)
- # babashka (53)
- # babashka-sci-dev (118)
- # beginners (74)
- # biff (10)
- # calva (13)
- # clara (13)
- # clerk (20)
- # clj-commons (17)
- # clj-kondo (6)
- # cljdoc (19)
- # cljs-dev (3)
- # clojars (2)
- # clojure (63)
- # clojure-art (2)
- # clojure-europe (68)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-uk (3)
- # clojured (19)
- # clojurescript (34)
- # clr (1)
- # cursive (11)
- # emacs (12)
- # fulcro (3)
- # helix (2)
- # holy-lambda (2)
- # honeysql (27)
- # hyperfiddle (36)
- # malli (2)
- # off-topic (72)
- # polylith (4)
- # rdf (20)
- # re-frame (20)
- # reitit (4)
- # rewrite-clj (14)
- # shadow-cljs (17)
- # slack-help (2)
- # tools-deps (36)
- # xtdb (3)
is it possible to define a schema for semi-homogenous maps? I have a map with a specific (optional) key that needs to point at one schema for its value (when present) but then every other key in the map is of a different type whose values are all of yet another type. to make things extra fun, I need that optional key to go through a custom decoder fn. so the specific key's schema looks like:
[:and
[:map-of ::at-context :any] ; for ::at-context's decode fn
[:map ["@context" {:optional true} ::context]]]
and the schema for the other k-v's in the map is:
[:map-of ::iri ::val]
but I have not found a way to combine those so that a map of mostly {::iri ::val}
can have an optional {"@context" ::context}
in it.