Fork me on GitHub
#reitit
<
2019-07-19
>
Kari Pahula05:07:32

I added authorization header for my endpoints with :parameters {:header {:authorization string?}}. It works but a failure is met with a coercion error and a 500 status. I'd like to rather return a 401.

valtteri15:07:47

Ahhh, coercion error. You probably want to define :authorization as optional and validate it later manually and return unauthorized.

☝️ 4
valtteri15:07:46

Coercion error sounds though like there's happening something unusual. Are you using default coercion/coerce-response-middleware and coercion/coerce-request-middleware?

y.khmelevskii21:07:15

Hi! can you help me to understand how I can change Model name in generated swagger ui https://i.stack.imgur.com/VwILh.png