Starting a new project using web api 2, we want to separate the API it self from the MVC page that among other things holds the auto generated API documentation.
My approach was to create a empty web api project and create my controllers. Then I created another project (same solution) of type web api, but this time I included the MVC part. Then I deleted the web api controllers from the MVC project (because I only want it for documentation) and included a reference to the API project.
This works (almost) perfect, the api project exposes the resources and the MVC project shows the auto generated documentation for the endpoints.
Now here comes the problem: Because we include the api project in the MVCproject the MVC project automatically exposes the endpoints as well, this is absolutely not desired and needs to be removed, I tried removing GlobalConfiguration.Configure(WebApiConfig.Register); from application_start in global.asax, now the endpoints are not exposed (as desired) but the documentation is not generated as well.
Anybody have an idea on how to get past this problem? For sure others people has been wanting the same separation...