ASP.NET Core Web Api自动帮助页面

dev*_*r82 6 asp.net asp.net-core-mvc asp.net-core asp.net-core-1.0 asp.net-core-webapi

在以前的ASP.NET版本中,当我创建Web Api 2时,visual studio会自动为API自动生成文档.

它也在这里解释:http: //www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/creating-api-help-pages

我正在编写一个新项目,我已决定使用ASP.NET Core,但我没有看到类似于以前版本中存在的API生成文档的内容(我也猜测是它有点不同,因为所有控制器现在都继承自同一个Controller类).

但是,有没有办法为ASP.NET Core API生成帮助文件?

Joh*_*son 7

您想要的功能位于https://github.com/domaindrivendev/Swashbuckle

以下链接提供了如何配置和使用精心设计的实用程序的示例 https://damienbod.com/2015/12/13/asp-net-5-mvc-6-api-documentation-using-swagger/