WebApi Help Page Description

后端 未结 3 1504
长发绾君心
长发绾君心 2020-12-04 17:36

What populates the Webapi method\'s description on the helper page and the introduction paragraph?

<script

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 17:53

    For those of you using VB.NET, you seem to have to do it a little differently.

    You have to go to the "Compile" tab (there is no Build tab) for the Web API project, then ensure "Generate XML documentation file" checkbox is checked.

    The output actually gets put in /bin/{projectName}.xml, so now you have to change the SetDocumentationProvider call to point to the path "~/bin/{projectname}.xml" (obviously, replace {projectname} with your actual project name).

    This seems smelly, so please let me know if anybody finds a different way to do it.

提交回复
热议问题