In aps.net web-api2, I'm looking for the mean to add some descriptions and additional informations in help pages for :
1) Response informations (Description column) this function return a collection of object:
2) When I click on an object link, how to add description for each properties :
I have already activated XML Documentation in project properties, and I try to add /// tag on some object property but it doens't work.
Thank you for your help
EDIT :
This is TOObjetAvecCriteres class :
public class TOObjetAvecCriteres : TOObjetMM
{
/// <summary>
/// Liste des critères
/// </summary>
public IList<Critere> Criteres { get; set; }
public TOObjetAvecCriteres()
{
Criteres = new List<Critere>();
}
}
And TOObjetMM class :
public class TOObjetMM
{
/// <summary>
/// Nom de l'objet
/// </summary>
public string Nom { get; set; }
/// <summary>
/// Pseudonyme de l'objet
/// </summary>
public string Pseudo { get; set; }
}
And
public class Critere : IObjetMM
{
/// <summary>
/// Nombre de décimales
/// </summary>
public int Decimale { get; private set; }
/// <summary>
/// Nom de l'objet métamodèle
/// </summary>
public string Nom { get; set; }
/// <summary>
/// Pseudonyme de l'objet métamodèle
/// </summary>
public string Pseudonyme { get; set; }
}
Perhaps the problem is that Critere class implement an interface and TOObjetAvecCriteres inherit from another class ?
To Patrick Hofman : It's not a duplicate answer, as I write "I have already activated XML Documentation in project properties" and description for API methods are visible, but impossible to find on msdn how to customize all parts of help pages.
As you can see, descriptions of methods are correctly displayed :
Each methods, classes, Interfaces, and Properties of my project are decorated with /// comment tag. But in Xml documentation, there is no entries for properties comments.
Thanks to remove "As duplicate tag"
EDIT : Solution
My problem was that my solution contains multiples projects. This is the solution :
- Generate XML documentation for all projects from properties tab
- Modify web api post-build events and add copy of subprojects xml documentation in appData web api folder
- Modify web api help Areas like this link : enable XML documentation for your subproject
- Enjoy !!