的ASP.NET Web API - 自动生成API文档 [英] ASP.NET Web API - Automatically generate API documentation

查看:427
本文介绍了的ASP.NET Web API - 自动生成API文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在建设使用的ASP.NET Web API一个RESTful API项目。

We are building a RESTful API project using ASP.NET Web API.

我们正在为我们我们的API,包括揭露每个方法调用寻找一种简单的方法来生成文档自动 - HTTP动词,URI,预期的参数和采样方法有效载荷

We are looking for an easy way to generate documentation automatically for each method call that we expose in our API including - HTTP verbs, URI, expected parameters and sample method payloads.

谁能推荐一些工具和方法,它们用于完成本作的ASP.NET Web API项目?

Can anyone recommend some tools and approaches they have used to accomplish this for an ASP.NET Web API project?

是否有连工具,将做到这一点?抑或是将是一个纪律手动过程?

Are there even tools that will do this? Or is it going to be a disciplined manual process?

推荐答案

该团队的WebAPI目前工作的一个工具来生成文档。该工具被称为ApiExplorer。

The webapi team is currently working on a tool to generate documentation. The tool is called ApiExplorer.

<一个href=\"http://blogs.msdn.com/b/yaohuang1/archive/2012/05/13/asp-net-web-api-introducing-iapiexplorer-apiexplorer.aspx\">http://blogs.msdn.com/b/yaohuang1/archive/2012/05/13/asp-net-web-api-introducing-iapiexplorer-apiexplorer.aspx

<一个href=\"http://blogs.msdn.com/b/yaohuang1/archive/2012/05/21/asp-net-web-api-generating-a-web-api-help-page-using-apiexplorer.aspx\">http://blogs.msdn.com/b/yaohuang1/archive/2012/05/21/asp-net-web-api-generating-a-web-api-help-page-using-apiexplorer.aspx

更新:下面是一些官方文档:<一href=\"http://www.asp.net/web-api/overview/creating-web-apis/creating-api-help-pages\">http://www.asp.net/web-api/overview/creating-web-apis/creating-api-help-pages

Update: Here is some official documentation: http://www.asp.net/web-api/overview/creating-web-apis/creating-api-help-pages

更新2015年3月1日 - 有一个名为Swashbuckle项目使用ApiExplorer生成扬鞭文档。 ( Github上的NuGet

Update 3/1/2015 - There is a Project called Swashbuckle that uses ApiExplorer to generate Swagger Docs. (Github, Nuget)

这篇关于的ASP.NET Web API - 自动生成API文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆