public ActionResult Index()
{
var docProvider = (WebApiDocumentationProvider)GlobalConfiguration.Configuration.Services.GetDocumentationProvider();
var apiExplorer = GlobalConfiguration.Configuration.Services.GetApiExplorer();
var apiActionDescriptions = apiExplorer.ApiDescriptions
.AsParallel()
.WithDegreeOfParallelism(1) // for debugging
//.WithDegreeOfParallelism(Environment.ProcessorCount) // production
.Select(description => CreateApiActionDescription(description, docProvider))
.ToList();
// You should probably cache the above documentation and generate it only when needed.
return View(apiActionDescriptions);
}