This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-12
Channels
- # arachne (1)
- # beginners (26)
- # cljs-dev (53)
- # cljsrn (1)
- # clojure (140)
- # clojure-italy (13)
- # clojure-russia (14)
- # clojure-spec (5)
- # clojure-uk (6)
- # clojurescript (52)
- # datascript (4)
- # datomic (11)
- # dirac (11)
- # emacs (12)
- # hoplon (9)
- # jobs (4)
- # lein-figwheel (1)
- # off-topic (29)
- # om (10)
- # om-next (1)
- # pedestal (3)
- # protorepl (1)
- # re-frame (16)
- # ring (12)
- # rum (27)
- # slack-help (12)
- # spacemacs (27)
- # unrepl (19)
- # untangled (26)
- # yada (8)
I am trying to use spec to validate/destructure external data (JSON). This data reuses key names throughout the various entities: there are keys named N
in various parts of data meaning "name", "route number" and "allowed number of things", and they should have different specifications. How do I specify that in spec?
I can do it via :req-un
in separate namespaces, but I'm not thrilled by the necessity to create ~15 namespaces, one for every entity kind.
@dottedmag You don't have to actually create the namespace, just fully qualify the specs (unless you want to alias namespaces, but you don't have to)
@yonatanel Thanks!