Hiding API Documentation in ASP.net

One really nice feature of ASP.Net Web API is the automated documentation, however you might not always want to show all of your controllers or actions there. If don’t want a controller or action to show up there, put this attribute on the the controller or action:

[ApiExplorerSettings(IgnoreApi = true)]

You will need to add the following to your includes:

using System.Web.Http.Description;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s