title: ASP.NET Web API Generate all parameters from model - help pages
body: <p>I'm busy creating a Web API (Inside a asp mvc4 application). I am using the library suggested on the asp.net site for generating documentation (<a href="http://www.asp.net/web-api/overview/creating-web-apis/creating-api-help-pages">http://www.asp.net/web-api/overview/creating-web-apis/creating-api-help-pages</a>).</p>
  
  <p>My problem is that if my parameter is a model, then I can't specify what properties the model contains in the generated help pages.</p>
  
  <p>Here is an example:</p>
  
  <p>MODEL:</p>
  
  <pre><code>public class TestModel
  {
      property String FirstName {get;set;}
      property String Surname {get; set;}
      property Boolean Active {get;set;} 
  }
  </code></pre>
  
  <p>ACTION:</p>
  
  <pre><code>/// &lt;summary&gt;
  /// This is a test action
  /// &lt;/summary&gt;
  /// &lt;param name="model"&gt;this is the model&lt;/param&gt; &lt;-- this works
  /// &lt;param name="FirstName"&gt;This is the first name &lt;/param&gt;  &lt;-- doesn't work
  /// &lt;param name ="model.Surname"&gt;This is the surname&lt;/param&gt; &lt;-- doesn't work
  public HttpResponseMessage Post(my.namespace.models.TestModel model)
  {
    ...
  }
  </code></pre>
  
  <p>Only the parameter for model gets generated.</p>
  
  <p>I took a look at the xml document that gets generated for the documentation and it does add the other parameters.</p>
  
  <pre><code>&lt;member name="my.namespace.api.Post(my.namespace.models.TestModel)"&gt;
       &lt;summary&gt;
           this is a test action
       &lt;/summary&gt;
       &lt;param name="model&gt;this is the model&lt;/param&gt;
       &lt;param name="FirstName"&gt;This is the first name &lt;/param&gt;
       &lt;param name="model.Surname"&gt;This is the surname&lt;/param&gt;
  &lt;/member&gt;
  </code></pre>
  
  <p>But on the help pages it only generates the parameter model.</p>
  
  <p>I have traced it down to the method where it gets the parameters from the xml.</p>
  
  <pre><code>Collection&lt;ApiDescription&gt; apiDescriptions = config.Services.GetApiExplorer().ApiDescriptions;
  </code></pre>
  
  <p>This is located in the HelpPageConfigurationExtentions.cs which is auto generated.</p>
  
  <p>Am i approaching this the wrong way? Does anyone know of a work around?</p>
  
  <p>Any suggestions or solutions will be appreciated.</p>