You can decorate a controller or action method with the ApiExplorerSettingsAttribute setting the IgnoreApi
property to NOT generate help info. If you try to apply the same to an action method's attribute, you get an error:
public HttpResponseMessage Post([ApiExplorerSettings(IgnoreApi = true)]HttpRequestMessage request, ... )
Error 2 Attribute 'ApiExplorerSettings' is not valid on this declaration type. It is only valid on 'class, method' declarations.
A common convention for keeping your controller actions testable is to accept an HttpRequestMessage
parameter, but this is an implementation detail, not something your API consumers should know about.
How can I prevent the ApiExplorer from including this parameter when it generates the help page?