title: Java Swagger UI - How to properly configure enums?
body: <p>I am using Swagger-UI with Java spring/hibernate.
  The Swagger UI version is 2.</p>
  
  <p>I am having hard time in using enums.</p>
  
  <p>I have a POJO model in which I have following enum property declared.</p>
  
  <pre><code>@Enumerated(EnumType.STRING)
  @Column(name = "gender")
  @Access(AccessType.FIELD)
  private Gender gender;
  </code></pre>
  
  <p>and the Gender is enum as follows:</p>
  
  <pre><code>public enum Gender {
  
      M("Male"), F("Female");
  
      private String displayValue;
  
      private Gender(String displayValue) {
          this.displayValue = displayValue;
      }
  
      @Override
      public String toString() {
          return displayValue;
      }
  
      public String getDisplayValue() {
          return displayValue;
      }
  
      public String getName() {
          return name();
      }   
  }
  </code></pre>
  
  <p>But my swagger displays only display values (<code>male</code> or <code>female</code>) in UI as well as the dropdown's display value. I want Swagger UI to display something similar like below which is HTML equivalent:</p>
  
  <pre><code>&lt;select name="gender"&gt;
  &lt;option value="M"&gt;Male&lt;/option&gt;
  &lt;option value="F"&gt;Female&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>How to achieve this?
   Reading up the Swagger UI docs, its so much confusing for me, unable to understand it. please help.</p>