Fork me on GitHub
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.


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

☝️ 4

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


Hi! can you help me to understand how I can change Model name in generated swagger ui