You could always extract specific keys from the payload and validate that,
something like:
(GET "/..." req
(let [b (:body req)
data {:my/result (:resultCount b)
:my/other-key (get-in b [:some :path])}]
(my-business-logic data)))
i.e. spec what your code (my-business-lo
Yes, the namespacing is great, so I have no issue with that. I would just
rather use snake-case in Clojure than camel-case. Since the payload has
'resultCount' I'd like to map that to a spec named result-count instead.
I think I figured out part of the answer:
(s/def :my/result int?)
(s/def :yo
Avoiding global name collision is the reason why specs are named with
namespace-qualified keywords. I am confused by your last sentence though.
Do you mean Clojure namespaces or the namespace component of the keyword
itself? There is no requirement in clojure.spec that the namespace of the
spec