0

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: enter image description here

2) When I click on an object link, how to add description for each properties :

enter image description here 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 : enter image description here

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 :

  1. Generate XML documentation for all projects from properties tab
  2. Modify web api post-build events and add copy of subprojects xml documentation in appData web api folder
  3. Modify web api help Areas like this link : enable XML documentation for your subproject
  4. Enjoy !!
user1069516
  • 443
  • 1
  • 7
  • 19
  • 1
    What does your code look like? Did you add the `summary`? – Panagiotis Kanavos Oct 02 '18 at 07:37
  • Without any code or other clue we can only point you to the duplicate. If you've done all the steps described there, and it still doesn't work, then edit the question and point that out. – Patrick Hofman Oct 02 '18 at 07:38
  • How does the documentation XML look like. Where is the documentation file located? – Patrick Hofman Oct 02 '18 at 08:06
  • To Patrick Hofman, xml documentation file is on the bin folder and it's an automated generated file... But actually there is no infos about my classes in the xml document. – user1069516 Oct 02 '18 at 08:11
  • It should not be in the bin folder. See the first sentence of the duplicate. – Patrick Hofman Oct 02 '18 at 08:12
  • The XML Documentation is already in App_Data folder but when you compile the solution, the file is copied in bin folder. And if the file was in the wrong folder, I would not be able to see the descriptions of API methods and sample responses. – user1069516 Oct 02 '18 at 08:31

0 Answers0