This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-31
Channels
- # announcements (1)
- # babashka (27)
- # beginners (33)
- # cider (22)
- # clj-kondo (1)
- # cljdoc (2)
- # cljs-dev (8)
- # clojure (96)
- # clojure-australia (7)
- # clojure-europe (24)
- # clojure-nl (1)
- # clojure-taiwan (1)
- # clojure-uk (7)
- # clojuredesign-podcast (4)
- # clojurescript (23)
- # clojureverse-ops (1)
- # conjure (11)
- # cursive (29)
- # datahike (1)
- # datascript (8)
- # datomic (4)
- # emacs (1)
- # figwheel-main (1)
- # fulcro (3)
- # helix (7)
- # jobs (4)
- # lsp (6)
- # malli (3)
- # off-topic (35)
- # pathom (6)
- # re-frame (4)
- # releases (1)
- # sci (18)
- # shadow-cljs (14)
- # sql (1)
- # tools-deps (11)
- # xtdb (6)
Apologies if I missed this while looking through the docs/source, but is there a way to make map schemas (and perhaps other schemas converted to the map syntax) self-documenting by adding something like:
(def my-map [:map [:k1 {:doc "A required key, typically used by the program to do foo."} :string] [:k2 {:optional true :doc "An optional key, typically used by the program for annotation purposes."} :string]])
It looks like malli.util/to-map-syntax
and malli.util/from-map-syntax
work just fine on the example I just gave, but I suppose I'm still wondering if the :doc
kw in the props map is intended for a different purpose or potentially reserved in some way.