I've been trying to document my Sitecore WebApi using Swashbuckle, but no luck. I've installed the Swashbuckle.Core
Nuget package, and added this logic to an Initialize
pipeline processor:
GlobalConfiguration.Configuration
.EnableSwagger();
I run this processor after adding my custom route to the Routes, using MapRoute
. I've found out Swashbuckle uses System.Web.Http.Description.ApiExplorer
to get a list of all controllers and actions. And indeed, every standard Sitecore API is listed, but not my custom controller and action, added in my custom route! Can anyone with experience in the ApiExplorer
tell me how to debug this? Could this mentioned bug still be an issue? Can I configure the ApiExplorer
to just print my custom controller and action, and not every default Sitecore API?
Thanks in advance!