Swashbuckle.WebApi icon indicating copy to clipboard operation
Swashbuckle.WebApi copied to clipboard

Swagger UI does not show properly when custom message handler is used in web api 2

Open abdulqayyum opened this issue 6 years ago • 2 comments

I am implementing a generic response for my web api 2 project. I implemented a delegatingHandler that create a response with my custom response type.

class WrappingHandler : DelegatingHandler{
...
}

Registered it in WebApiConfig before routes like

config.MessageHandlers.Add(new WrappingHandler());

I have swashbuckle 5.6.0 installed when I comment above line swagger UI shows up. However, with above code UI does not show any API controllers. Only this show up:

{"StatusCode":200,"ErrorMessage":null,"response":null}

There is no error in console and UI works fine otherwise.

abdulqayyum avatar Sep 05 '19 07:09 abdulqayyum

I have same issue. Can anyone help please?

duyhau206 avatar Oct 17 '19 08:10 duyhau206

Same

Alchoder avatar Jul 07 '22 14:07 Alchoder