title: QueryParam declared as not required in Swagger API
body: <p>I have implemented a Jax-RS resource (using Dropwizard) which contains this method:</p>
  
  <pre><code>import javax.ws.rs.DefaultValue;
  import javax.ws.rs.HeaderParam;
  import javax.ws.rs.POST;
  import javax.ws.rs.QueryParam;
  import org.hibernate.validator.constraints.NotEmpty;
  [...]
  
  @POST
  @Timed
  public Prediction predict(
          @QueryParam("content") @NotEmpty String content,
          @HeaderParam("outputProbability") @DefaultValue("false") Boolean outputProbability) {
      return outputProbability ? getPredictionWithProb(content) : getPrediction(content);
  }
  </code></pre>
  
  <p>In my <code>pom.xml</code>, I have added the <code>swagger-maven-plugin</code> like this:</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;com.github.kongchen&lt;/groupId&gt;
              &lt;artifactId&gt;swagger-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;${swagger-maven-plugin-version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;apiSources&gt;
                      &lt;apiSource&gt;
                          &lt;springmvc&gt;false&lt;/springmvc&gt;
                          &lt;schemes&gt;
                              &lt;scheme&gt;http&lt;/scheme&gt;
                          &lt;/schemes&gt;
                          &lt;locations&gt;[...]&lt;/locations&gt;
                          &lt;info&gt;[...]&lt;/info&gt;
                          &lt;swaggerDirectory&gt;src/main/resources/swagger&lt;/swaggerDirectory&gt;
                      &lt;/apiSource&gt;
                  &lt;/apiSources&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;compile&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;generate&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>When I run <code>mvn compile</code>, it creates the <code>swagger.json</code> file containing these entries:</p>
  
  <pre><code>"paths" : {
  "/predict" : {
    "post" : {
      "operationId" : "predict",
      "produces" : [ "application/json" ],
      "parameters" : [ {
        "name" : "content",
        "in" : "query",
        "required" : false,
        "type" : "string"
      }, {
        "name" : "outputProbability",
        "in" : "header",
        "required" : false,
        "type" : "boolean",
        "default" : false
      } ],
  [...]
  </code></pre>
  
  <p>This is all fine, except one line in the <code>content</code> parameter definition:</p>
  
  <pre><code>      "required" : false,
  </code></pre>
  
  <p>However, the <code>content</code> field is clearly required. This is also confirmed when I call the service: if the <code>content</code> parameter is not provided, it throws an error.</p>
  
  <p>From <a href="https://stackoverflow.com/a/34179511/1897839">this answer</a>, it seems like I could explicitly state that the parameter is required by using the Swagger <a href="https://github.com/swagger-api/swagger-core/wiki/Annotations#apiparam" rel="nofollow noreferrer">@ApiParam annotation</a>. However, I would prefer not to introduce additional code and dependencies only for the purpose of the Swagger API definition.</p>
  
  <p>This looks like a rather minor problem, but it might indicate a bug in my code or even in the <code>swagger-maven-plugin</code>. Have I missed anything?</p>
  
  <p>Does the Swagger plugin does not recognize the <code>@org.hibernate.validator.constraints.NotEmpty</code> annotation? If it does not, is the Swagger <code>@OpenAPI</code> parameter the only way to declare a parameter as required for the Swagger plugin?</p>