title: Restricting auto Help Page contents when using Attribute Routing in Web API 2
body: <p>I'm currently implementing a Web API using Web API 2's attribute routing (<a href="http://www.asp.net/web-api/overview/web-api-routing-and-actions/attribute-routing-in-web-api-2" rel="nofollow">http://www.asp.net/web-api/overview/web-api-routing-and-actions/attribute-routing-in-web-api-2</a>). I am also using the Help Pages module in order to automatically generate documentation from XML comments (<a href="http://www.asp.net/web-api/overview/creating-web-apis/creating-api-help-pages" rel="nofollow">http://www.asp.net/web-api/overview/creating-web-apis/creating-api-help-pages</a>).</p>
  
  <p>For this API I am providing support for optional return format extensions, so that every API method has a pair of routes defined on it like so:</p>
  
  <pre><code>[HttpGet]
  [Route("Path/Foo")]
  [Route("Path/Foo.{ext}")]
  public HttpResponseMessage DoFoo()
  {
      // Some API function.
  }
  </code></pre>
  
  <p>This allows a user to hit any of these and get a result:</p>
  
  <pre><code>www.example.com/api/Controller/Path/Foo 
  www.example.com/api/Controller/Path/Foo.json
  www.example.com/api/Controller/Path/Foo.xml
  </code></pre>
  
  <p>My issue is that when Help Pages uses MapHttpAttributeRoutes() to generate documentation, it is picking up both routes for each method. So right now I see help for:</p>
  
  <pre><code>api/Controller/Foo
  api/Controller/Foo.{ext}
  </code></pre>
  
  <p>But I want to only see:</p>
  
  <pre><code>api/Controller/Foo.{ext}
  </code></pre>
  
  <p>I would prefer to hide the non-extension route on each method, so that every method only shows a single Help Page entry.</p>
  
  <p>Has anyone else tried something similar? Is there a work around that I am missing?</p>