How to generate WebAPI document in Orchard Module

Topics: Writing modules
Jun 24, 2013 at 10:28 AM
Edited Jun 24, 2013 at 10:29 AM
I load package "Microsoft ASP.NET Web API Help Page" from NuGet and it works for project "ASP.NET MVC 4 Web Application" that I created by not in Orchard Module.

After load package to this project, it will create the following folders.
  • Areas
    • HelpPage
    • App_Start
      __ - HelpPageConfig.cs__
    • Controllers
      __ - HelpController.cs__
    • Models
      __ - HelpPageApiModel.cs__
    • SampleGeneration
    • Views
      • Help
      • DisplayTemplates
        __ - Api.cshtml__
        __ - Index.cshtml__
      • Shared
        • _Layout.cshtml
      • _ViewStart.cshtml
    • ApiDescriptionExtensions.cs
    • HelpPage.css
      __ - HelpPageAreaRegistration.cs__
    • HelpPageConfigurationExtensions.cs
    • TestClient.css
    • XmlDocumentationProvider.cs
But when I load package "Microsoft ASP.NET Web API Help Page" from NuGet to Orchard Module that have WebAPI class (e.g. ProductController), when it calls "Index" in the "HelpController.cs", number of "Configuration.Services.GetApiExplorer().ApiDescriptions" will be 0.

__public ActionResult Index()
{
        return View(Configuration.Services.GetApiExplorer().ApiDescriptions);
}__

I am not sure how do we fix this problem. Or are there other ways to generate WebAPI document in Orchard Module?