Web Api Help Page - Show only some controllers but no others

4.9k views Asked by At

I've an application made in Web Api 2.1 (Visual Studio 2012 C#) and I made a Help page with XML Documentation.

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

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

Thanks in advance

1

There are 1 answers

1
mreyeros On BEST ANSWER

For every API controller that you would like to have excluded from the auto generated help pages you should add the following attribute to your controller:

 [ApiExplorerSettings(IgnoreApi = true)]  


P.S. You have to include the following using statement:

System.Web.Http.Description