proudmonkey / AutoWrapper

A simple, yet customizable global exception handler and Http response wrapper for ASP.NET Core APIs.
MIT License
679 stars 82 forks source link

Swagger not working after installing AutoWrapper. #61

Closed BlazorPlate closed 4 years ago

BlazorPlate commented 4 years ago

Hi,

Great Job! you deserve all respect in the world.

This is what I've got after installing AutoWrapper:

**Unable to render this definition The provided definition does not specify a valid version field.

Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0).**

I'm using the latest version of Swashbuckle.AspNetCore

Waiting your response please...

proudmonkey commented 4 years ago

Hi @mohammad198600,

To me, seems like the error has nothing to do with AutoWrapper. Perhaps it has something to do on how you configure swagger in your application.

The quick way to verify that is to comment out the AutoWrapper middleware and run your app again. If you are still getting error then it has something to do with your swagger config.

BlazorPlate commented 4 years ago

Thank so much for your quick response!

Yes, you were right about swagger configuration. it was misconfigured. I fixed it and everything works perfectly.