Reputation: 215
I have ASP.NET WebApi v2.1 installed with ASP.NET Web API Help Page v2.1
I am generating an XML file on build which is being placed in the App_Data folder, and it seems to have the generated documentation from my controllers in it.
The service is opening that XML file without any problem. I changed the name just to make sure it was in fact opening it.
When I navigate to the help page, I see the header information but no APIs are listed.
I'm assuming it's because the APIExplorer cannot find my controllers, since they are not explicitly mapped. IOW, in my WebApiConfig.cs I have ONLY
config.Routes.MapODataRoute("odata", "Odata", getImplicitEdm());
where "getImplicitEdm" uses OdataConventionModelBuilder() to define entities and GetEdmModel() to pass the model to MapOdataRoute().
How can I get the APIExplorer to "find" my controllers?
Upvotes: 1
Views: 2927
Reputation: 8862
API Explorer does not support the OData service/OData controllers.
The (almost) equivalent support for OData comes from the http:///odata/$metadata. Note that $metadata refers only to the entitysets and not the actual controllers. So for example it will still show a users end point even if the users controller does not exist.
This article has a section on $metadata: http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/creating-an-odata-endpoint
A feature request for this feature is tracked by https://github.com/OData/WebApi/issues/94
Upvotes: 3