title: Duplicate parameter output in Swagger
body: <p>Update:
  I'm starting to wonder if this is due to a bug:</p>
  
  <p><a href="https://github.com/domaindrivendev/Swashbuckle/issues/590" rel="nofollow noreferrer">https://github.com/domaindrivendev/Swashbuckle/issues/590</a></p>
  
  <p>But the workaround suggested there does not seem to solve my problem.</p>
  
  <hr>
  
  <p>I am using Swashbuckle to generate API documentation for a C# ASP.NET Web API project.</p>
  
  <p>My target is to allow the following as valid URL:</p>
  
  <pre><code>/endpoint/items/123/foo?param2=bar
  </code></pre>
  
  <p>With a required parameter (param1) set to "foo" and an optional parameter (param2) set to "bar". I would like both parameters contained inside a single C# parameter object. (with other optional parameters like param3 and so on). Several endpoints will use identical parameters and I would like to have a single object representing the parameters.</p>
  
  <p>The details of Swagger/Swashbuckle are mostly a black box to be, and I'm unable to figure this out. I'm getting duplicates in the parameter list.</p>
  
  <p>Sample code to reproduce the problem:</p>
  
  <pre><code>    // This endpoint is generating documentation the way I would like.
      [HttpGet]
      [Route("endpoint1/items/{id}/{param1}")]
      public string GetDataForParameters(int id, string param1, string param2 = null, string param3 = null)
      {
          return string.Format("Params: {1}, {2}, {3}", id, param1, param2, param3);
      }
  
      // This endpoint has the structure I would like, but I get duplicates for param1 in the documentation.
      [HttpGet]
      [Route("endpoint2/items/{id}/{param1}")]
      public string GetDataForParameters(int id, [FromUri(Name = "")]MyParams myParams)
      {
          return string.Format("Params: {1}, {2}, {3}", id, myParams.Param1, myParams.Param2, myParams.Param3);
      }
  
      public class MyParams
      {
          public string Param1 { get; set;}
          public string Param2 { get; set;}
          public string Param3 { get; set;}
      }
  </code></pre>
  
  <p>With the second method, I receive the parameters inside a single object. But Swagger displays a duplicate entry for the "param1".</p>
  
  <p>Screenshot: <a href="https://i.stack.imgur.com/VwGsM.png" rel="nofollow noreferrer">Swagger duplicate parameter</a></p>
  
  <p>How can I make Swagger/Swashbuckle not display the second entry for "param1"?</p>
  
  <hr>
  
  <p>The reason for having this structure is that I have multiple endpoints that return different types of data, but they use common parameters.
  Some of the parameters are required (and a prt of the ID) so we would like to include those in the URL, with optional parameters in the querystring.
  I would prefer the common parameter object should include both required and optional parameters.</p>
  
  <p>Sample code created with Visual Studio 2015 update 1. Default ASP.NET Web API project. Adding the code above to the generated ValuesController.cs. Installed package Swashbuckle 5.3.1 + dependencies.</p>