title: Swashbuckle generated Swagger has errors
body: <p>I'm testing swagger metadata generated by Swashbuckle nuget package against <a href="http://editor.swagger.io/" rel="nofollow noreferrer">http://editor.swagger.io/</a> and have the following section in the metadata:</p>
  
  <pre><code>     "/User":{
       "get":{
                &lt;snip&gt;
       }
       "post":{
          "tags":[
             "User"
          ],
          "summary":"Create a new user, adds them to a space and sets dashboard view.",
          "operationId":"User_Post",
          "consumes":[
             "application/json",
             "text/json"
          ],
          "produces":[
  
          ],
          "parameters":[ // This line is marked as an error.
             {
                "name":"user",
                "in":"body",
                "description":"New user's username and assigned space.",
                "required":true,
                "schema":{
                   "$ref":"#/definitions/F1.Birst.CreateUserRequest"
                }
             },
             {
                "name":"Authorization",
                "in":"header",
                "description":"access token",
                "required":true,
                "type":"string"
             }
          ],
          "responses":{
             "204":{
                "description":"No Content"
             }
          },
          "deprecated":false
       }
    },
  </code></pre>
  
  <p>The reported error is:</p>
  
  <pre><code>Swagger Error
  Not a valid parameter definition
  Jump to line 330
  Details
   Object
  code:  "ONE_OF_MISSING"
   params: Array [0]
  message:  "Not a valid parameter definition"
   path: Array [5]
  schemaId:  "http://swagger.io/v2/schema.json#"
   inner: Array [2]
  level: 900
  type:  "Swagger Error"
  description:  "Not a valid parameter definition"
  lineNumber: 330
  </code></pre>
  
  <p>Code generation still seems to work using NSwag without issues. Is this a problem with Swagger's editor, a problem with Swasbuckle, and why is NSwag able to handle this without issue?</p>
  
  <p>Would other swagger code generators have problems with this?</p>
  
  <p>If it's not a problem with Swagger Editor or Swashbuckle, how would I fix this in my code? The current definition is below:</p>
  
  <pre><code>    /// &lt;summary&gt;
      /// Create a new user, adds them to a space and sets dashboard view.
      /// &lt;/summary&gt;
      /// &lt;param name="user"&gt;New user's username and assigned space.&lt;/param&gt;
      public void Post([FromBody] CreateUserRequest user)
  </code></pre>
  
  <p>I've tried</p>
  
  <pre><code>    /// &lt;summary&gt;
      /// Create a new user, adds them to a space and sets dashboard view.
      /// &lt;/summary&gt;
      /// &lt;param name="user"&gt;New user's username and assigned space.&lt;/param&gt;
      public void Post([FromBody][ModelBinder] CreateUserRequest user)
  </code></pre>
  
  <p>but that ended up putting the variables into the query string.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Here is the definition for CreateUserRequest. The validator is throwing errors for the regex (which is valid C# regex). I'm assuming this is due to the validator using JS regex syntax?</p>
  
  <p>Would this be the underlying cause for the "Not a valid parameter definition"? If so, then I suppose it's just a duplicate of the other error. Showing a regex error at the regex, and another error when the class is being referenced as a parameter?</p>
  
  <pre><code>  "F1.Birst.CreateUserRequest":{
       "required":[
          "username",
          "space"
       ],
       "type":"object",
       "properties":{
          "username":{
             "pattern":"(?i:^f1(\\.(test|churchstaff|churchuser|internal))?\\.\\d+\\.\\d+$)",
             "type":"string"
          },
          "space":{
             "pattern":"(?i:^f1\\.[\\d\\w]+$)",
             "type":"string"
          }
       }
    },
  </code></pre>
  
  <p>Class definition:</p>
  
  <pre><code>public class CreateUserRequest
  {
      [Required]
      [RegularExpression(@"(?i:^f1(\.(test|churchstaff|churchuser|internal))?\.\d+\.\d+$)")]
      public string Username { get; set; }
  
      [Required]
      [RegularExpression(@"(?i:^f1\.[\d\w]+$)")]
      public string Space { get; set; }
  }
  </code></pre>