Fork me on GitHub
#reitit
<
2020-09-29
>
markbastian23:09:47

I recently upgraded reitit and now any endpoint that takes form params using the newer Swagger UI seems to return a 500 with the response:

connection: close 
 server: Jetty(9.4.28.v20200408) 
Does this ring a bell as to a new or existing issue? I can call the endpoint successfully with the clj-http client.

markbastian05:09:33

It looks like there is a bug in the latest ring-swagger-ui. I can use this route

["/auth" {:post       (constantly (ok {:okey "dokey"}))
           :parameters {:form {:username string?}}
           :responses  {200 {:body {:okey string?}}}}]
and I always get the above connection close result. If I revert to metosin/ring-swagger-ui version 2.2.10 the endpoint works. I'd be happy to post a more complete example if needed. Also, here's the output from the developer console if that's helpful:

markbastian13:09:56

Great. Thanks!