title: How to pass empty value to a query param in swagger?
body: <p>I am trying to access an url similar to <a href="http://example.com/service1?q1=a&amp;q2=b" rel="noreferrer">http://example.com/service1?q1=a&amp;q2=b</a>. However q1 will not have any values associated with it sometimes but is required to access the service (<a href="http://example.com/service1?q1=&amp;q2=b" rel="noreferrer">http://example.com/service1?q1=&amp;q2=b</a>). How do I achieve this through swagger ui JSON. I've tried using allowEmptyValue option but it doesn't seem to work.</p>
  
  <p>Please find below the sample JSON I tried using allowEmptyValue option,</p>
  
  <pre><code>{
      "path": "/service1.do",
      "operations": [{
          "method": "GET",
          "type": "void",
          "parameters": [{
                  "name": "q1",
                  "in" : "query",
                  "required": false,
                  "type": "string",
                  "paramType": "query",
                  "allowEmptyValue": true
              },{
                  "name": "q2",
                  "in" : "query",
                  "required": true,
                  "type": "string",
                  "paramType": "query",
              }
  
  
          ],
          "responseMessages": [{
              "code": 200,
              "responseModel": "/successResponseModel"
          }
  }
  </code></pre>
  
  <p>When an empty value is passed to q1, swagger frames the URL as <a href="http://example.com/service1?q2=b" rel="noreferrer">http://example.com/service1?q2=b</a>. Is there anyway to include q1 with empty values to be included in the URL (<a href="http://example.com/service1?q1=&amp;q2=b" rel="noreferrer">http://example.com/service1?q1=&amp;q2=b</a>) ?</p>
  
  <p>Any help would be greatly appreciated.</p>