This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-15
Channels
- # aws (4)
- # beginners (98)
- # boot (23)
- # cider (63)
- # cljsrn (3)
- # clojure (259)
- # clojure-boston (1)
- # clojure-dev (2)
- # clojure-italy (6)
- # clojure-nl (17)
- # clojure-russia (1)
- # clojure-serbia (1)
- # clojure-spec (36)
- # clojure-uk (74)
- # clojurescript (11)
- # cursive (2)
- # datascript (12)
- # datomic (36)
- # defnpodcast (1)
- # devops (1)
- # docs (1)
- # emacs (15)
- # euroclojure (3)
- # fulcro (13)
- # graphql (1)
- # juxt (2)
- # lumo (27)
- # off-topic (46)
- # onyx (23)
- # pedestal (6)
- # planck (2)
- # portkey (27)
- # re-frame (18)
- # reagent (12)
- # remote-jobs (2)
- # ring-swagger (11)
- # rum (4)
- # shadow-cljs (104)
- # spacemacs (4)
- # sql (3)
- # tools-deps (5)
- # vim (45)
(defmethod shape-to-spec “list” [ns [name {{:strs [shape]} “member” :strs [max]}]]
`(spec/and
(spec/coll-of ~(keyword ns (aws/dashed shape)) :max-count ~max)
(spec/conformer identity #(if (sequential? %) % [%])))) ; HAL ❤
I’d like to get rid of all conforms because I want specs to work first as a clean documentation.
so in gen-api
I make provision for some vars (prefixed by ser-
deser-
req-
and resp-
followed by a spec name), they are expectd to be populated by functions doing transformations.
so while making a call, the data that is fed to say ser-create-function-request
would be checked against a spec?
Yes
1/ call conform or valid
2/ call req<-create-function-request
-- it indirectly calls some ser-stuff
to performs coercion and small fixes
3/ serialize the body of the request in the *-call
fn
hey, @cgrand I am going to look at your wip next monday
did not have the time last few days