Web Api Help Page. Show only some controllers, but no others.

I have an application built in Web Api 2.1 (Visual Studio 2012 C #) and I made a help page with XML documentation.

I just want to only expose some controllers, not all controllers of my Web Api, but at the same time I don't want to remove comments from methods, classes, properties, etc.

How can I select some elements and not show others in my help?

Thank you in advance

+3


source to share


1 answer


For each API controller that you would like to exclude from the auto-generated help pages, you must add the following attribute to your controller:

 [ApiExplorerSettings(IgnoreApi = true)]  

      




Postscript You must include the following instruction:

System.Web.Http.Description

+8


source







All Articles