Fork me on GitHub
Faisal Hasnain13:09:58

does anyone having ideas about how to allow vector/array for POST body requests using spec coercion:

(s/def ::body (s/coll-of string?))

(def routes
    {:post {:parameters {:body ::photos}}}]])
right now there is some implicit spec which is forcing the body to be a map. any ways to override that?

Faisal Hasnain13:09:24

never mind, i need to specify spec as vector [::photos]




oh, that's because the spec-coercion accepts both normal specs and data-specs.


you can also say (s/coll-of ...) with normal specs

Faisal Hasnain17:09:54

that did not work on latest version