运用Swagger 添加WebAPI 文档

1. Go to Web link https://www.nuget.org/packages/Swashbuckle/ and check which version do we want.

2. Open Vs project and go to NuGet Tool Console, type "Install-Package Swashbuckle -Version 5.3.2".

3. It will generate a new file "SwaggerConfig" in App_Start folder. You can change the Description by this line " c.SingleApiVersion("v1", "Libaray.Web");"

4. run the application then redirect to http://localhost:49919/swagger, you will get your API document. 

原文地址:https://www.cnblogs.com/VirtualMJ/p/5461398.html