ASP.NET web api: documenting/specifying a service

后端 未结 2 1167
余生分开走
余生分开走 2020-12-31 10:41

I\'ve been looking at asp.net Web Api, and I like the simplicity of implementing a practical web service.

However, how can I document/specify the interface of a serv

2条回答
  •  孤城傲影
    2020-12-31 11:15

    You can use IApiExplorer interface and ApiExplorer class in order to create a help page for your Web Api service. This help page will describe the REST methods exposed by your service so any developer who understands how REST works will be able to use it (regardless the language). Please read below links for details and samples:

    • ASP.NET Web API: Introducing IApiExplorer/ApiExplorer
    • ASP.NET Web API: Generating a Web API help page using ApiExplorer
    • Documenting your ASP.Net Web API’s

提交回复
热议问题