Is there a way to exclude an API controller? I don't want to show this controller because i'm still working on it.
I've added the obsolete method on each action but I find it it repetitive. Is there a configuration, annotation, or better way to exclude controllers not ready for documentation?
Swashbuckle is built on top of IApiExplorer and so you can use the following attribute to ignore an entire controller:
[ApiExplorerSettings(IgnoreApi = true)]
public class MySpecialController : ApiController
{
Is it possible to dynamically change the visibility of controllers within Swashbuckle, based upon a url?
For example
/internal/swagger
might show internal/diagnostic endpoints that a public
/swagger
might not?
Just an idea. Thanks so much for this project!
@mattlpage probably too late for you but adding here for reference:
The [ApiExplorerSettings] attribute is allowed at Controller as well as Action method level. So effectively, one can exclude a single endpoint/route from a controller
please, make settings to ignore all API but only has [SwaggerInclude] attribute or something
Most helpful comment
Swashbuckle is built on top of IApiExplorer and so you can use the following attribute to ignore an entire controller: