title: Java swagger-ui doesn't render allowableValues for parameter
body: <p>I have a SpringBoot, JAX-RS, and Maven app.  I'm using Swagger annotations to provide info on the REST service interface.  It basically works, but I'm having trouble with some parameters that I expect a limited set of values.  I believe I'm specifying the &quot;@Api...&quot; annotations correctly, and I can see the expected results in the swagger.json file, but the swagger-ui doesn't appear to do anything with that information.</p>
  <p>My pom.xml appears to specify version 1.5.20 of the swagger artifacts.</p>
  <p>The following is a heavily elided excerpt from the Java interface:</p>
  <pre><code>@GET
  @Path(&quot;...&quot;)
  @ApiOperation(&quot;...&quot;)
  @ApiImplicitParams({
      ...
      @ApiImplicitParam(name = &quot;poi_types&quot;, value = &quot;Types of locations to include&quot;,
                        allowableValues = &quot;pos, wifi, country&quot;,
                        dataType = &quot;string&quot;, paramType = &quot;query&quot;),
      ...
      })
  public Object ...(@QueryParam(...)
                                @ApiParam(name = ..., value = &quot;...&quot;)
                    String ...) {
  </code></pre>
  <p>In the swagger.json, I see the following for that entry:</p>
  <pre><code>    {
          &quot;name&quot; : &quot;poi_types&quot;,
          &quot;in&quot; : &quot;query&quot;,
          &quot;description&quot; : &quot;Types of locations to include&quot;,
          &quot;required&quot; : false,
          &quot;type&quot; : &quot;string&quot;,
          &quot;enum&quot; : [ &quot;pos&quot;, &quot;wifi&quot;, &quot;country&quot; ]
      }
  </code></pre>
  <p>In the generated UI, I see the following:</p>
  <p><a href="https://i.stack.imgur.com/KLI0s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KLI0s.png" alt="swagger-ui excerpt for poi_types" /></a></p>
  <p>I've seen somewhere some mentions of possible disconnects between the required schema and what swagger-ui renders, like perhaps requiring a &quot;schema&quot; element in the parameter definition that includes the &quot;type&quot;and &quot;enum&quot; properties.  I tried manually changing the swagger.json to include that, but it made no difference.</p>
  <p>Can anyone provide any background here?</p>
  <p><strong>Update</strong>:</p>
  <p>I upgraded to swagger-core and swagger-annotations v1.6.2.  I also tried putting &quot;allowableValues&quot; into an &quot;@ApiParam&quot; instead of just an &quot;@ApiImplicitParam&quot;.  Neither of these changes made any difference.  I don't see any indication in the UI of the allowable values.</p>
  <p>This is the changed element from the @ApiParam change:</p>
  <pre><code>    {
        &quot;name&quot; : &quot;isocc2&quot;,
        &quot;in&quot; : &quot;query&quot;,
        &quot;description&quot; : &quot;Country code&quot;,
        &quot;required&quot; : false,
        &quot;type&quot; : &quot;string&quot;,
        &quot;enum&quot; : [ &quot;en&quot;, &quot;es&quot; ]
      }
  </code></pre>
  <p>This is how this displays in the swagger UI:</p>
  <p><a href="https://i.stack.imgur.com/vexYY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vexYY.png" alt="view of parameter with allowableValues" /></a></p>
  <p>I also verified from the browser the swagger.json that it loaded, and it matches what I expected.</p>
  <p>Just in case, I tested it in Chrome in addition to Firefox.</p>
  <p>What else could be wrong here?</p>