.NetCore学习笔记:六、Swagger API接口文档工具
Swagger一个优秀的Api接口文档生成工具。Swagger可以可以动态生成Api接口文档,有效的降低前后端人员关于Api接口的沟通成本,促进项目高效开发。 1、使用NuGet安装最新的包:Swashbuckle.AspNetCore。 2、编辑项目文件(NetCoreTemplate.Web.csproj),配置Xml文档生成目录。 < PropertyGroup Condition ="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" > < DocumentationFile > bin\Debug\netcoreapp3.1\NetCoreTemplate.Web.xml </ DocumentationFile > < OutputPath > bin\Debug\netcoreapp3.1\ </ OutputPath > </ PropertyGroup > < PropertyGroup Condition ="'$(Configuration)|$(Platform)'=='Release|AnyCPU'" > < DocumentationFile > bin\Release\netcoreapp3.1\NetCoreTemplate.Web.xml </ DocumentationFile > <