WebAPI automatically generate help documents

Source: Internet
Author: User

About automating the generation of API help documents for local testing

1. Install by NuGet Reference:

A: Search Web API test Client for installation

B: Install Install-package webapitestclient by code

2, after the installation of the project will automatically add areas folder and a bunch of files

3, App_Data folder in the new file: Xmldocument.xml, nothing to do, the new is good

4. Modify Project Properties

To the current location our help document is basically generated ()

Unfortunately, the description of the method is not displayed.

5, modify the Code display description information

Modify this file

Remove this line comment

Get it done!

Off Topic:

Of course, you can change the API's display by modifying the API routing rules (WebApiConfig.cs), for example, to show it this way (add action, although Microsoft says it doesn't fit the perception of webservices, but it's more convenient to test what it's like, For everyone's reference only):

WebAPI automatically generate help documents

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.