reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
2020-08-05T22:31:00.419500Z

Hey all, I'm trying to create a file upload endpoint with tags for the file. In part, it looks like this in retit:

["/upload"
    {:post {:summary    "upload a file with tags"
            :parameters {:multipart {:file                 multipart/temp-file-part
                                     :tags                 [string?]}}
...
The generated swagger ui creates the right controls, but the request fails to be coerced correctly. In part, I get the following error (using the tags a, b, c):
"pred": "clojure.core/coll?",
  "val": "a&tags=b&tags=c",
Is there a middleware I should be using to parse the request or some other solution? Right now I've got coercion/coerce-request-middleware in my middlewares list. I suppose I could add a custom middleware to parse the tags value before it hits the coercer or something, but I'm hoping this is a solved problem.