1、创建一个WebAPI项目

 下载、安装、引入【Swashbuckle.AspNetCore】包
右击【解决方案】,然后点击【管理Nuget包】,搜索【Swashbuckle.AspNetCore】包

2、配置Swagger中间件
在【Startup.cs】文件中的【ConfigureService】类中添加如下代码。

在【Startup.cs】文件中的【Configure】类中启用Swagger中间件

3、运行项目
WebApi配置正确

Swagger配置正确

swagger/index.html配置正确

4、设置默认直接到swagger界面

5、启用XML注释

startup中增加xml解析








![The remote endpoint was in state [TEXT_FULL_WRITING]](https://img-blog.csdnimg.cn/053294cf1aba4f399939b72484424c91.png)



![[BitSail] Connector开发详解系列四:Sink、Writer](https://img-blog.csdnimg.cn/cbe42221da944511b2bf7e191c729c57.png#pic_center)







