I have a preexisting MVC app that I added Web API and Web API Self Documentation using Nuget. While the Web API controllers function fine (return valid responses to HTTP requests) the Help controller is not finding any Web API methods to document.
In the Help controller Index action "Configuration.Services.GetApiExplorer().ApiDescriptions" is returning with 0 results.
I even went as far as copying the entire "HelpPage" area from another functioning web app.
What populated ApiDescriptions and are there any config settings I need to set to expose my api to documentations?
Things I have tried:
It turns out my Glimpse MVC 4 installation was interfering. This is a known issue with Glimpse and Web API Help Pages. Uninstalling Glimpse fixes the problem.
The link provided by William also provides the following work-around in this comment which worked for me:
For now, you can use a simple workaround by ignoring the RoutesInspector. Just add this to your web.config:
<glimpse defaultRuntimePolicy="On" endpointBaseUri="~/Glimpse.axd">
<inspectors>
<ignoredTypes>
<add type="Glimpse.AspNet.Inspector.RoutesInspector, Glimpse.AspNet"/>
</ignoredTypes>
</inspectors>
</glimpse>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With