I installed the package from NuGet, uncommented the line from HelpPageConfig.cs-
config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/App_Data/XmlDocument.xml")));
I've set the same file under Properties->Build->XML documentation file, Added a new Global.asax.cs file in which I call for registration for all the areas under Application_Start method:
protected void Application_Start(object sender, EventArgs e)
{
AreaRegistration.RegisterAllAreas();
}
I've added some summary for some of my controllers:
public class IncidentsController : ApiController
{
/// <summary>
/// this is the summary
/// </summary>
/// <param name="incidentId">this is incidentId</param>
/// <returns>it returns something</returns>
[Route("{incidentId}")]
[HttpGet]
public object GetIncidentById(int incidentId)
{
return Incidents.SingleOrDefault(i => i.id == incidentId);
}
}
when i run the webpage and go to '/help' the only thing i see is
ASP.NET Web API Help Page
Introduction
Provide a general description of your APIs here.
and an empty page after that...
I tried to debug that and in HelpController.cs in:
public ActionResult Index()
{
ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider();
return View(Configuration.Services.GetApiExplorer().ApiDescriptions);
}
I get no ApiDescriptions.
what am I missing? I'll appreciate any help!