enhancementhelp wanted
Description
When defining a route with an array value in the query params like so:
{:get {:parameters {:query {:strings [string?]}}
:handler (fn [{{:keys [query]} :parameters}]
{:status 200
:body query})}}
the query string is expected to look something like ?strings=hello&strings=world. However when only one is sent the query string will be ?strings=hello. Causing reitit to spit out
{
"spec": "(spec-tools.core/spec {:spec (clojure.spec.alpha/keys :req-un [:spec$367119/strings]), :type :map, :leaf? false})",
"problems": [
{
"path": [
"strings"
],
"pred": "clojure.core/coll?",
"val": "hello",
"via": [
"spec$367119/strings"
],
"in": [
"strings"
]
}
],
"type": "reitit.coercion/request-coercion",
"coercion": "spec",
"value": {
"strings": "hello"
},
"in": [
"request",
"query-params"
]
}
Maybe reitit should be able to coerce ?strings=hello to ["hello"] if the spec is (coll-of string?)?