title: How to define enum values in array or enum as key in map property?
body: <p>I am using swagger-codegen-maven-plugin (2.2.1) to generate java and typescript code class files from YML configuration. I have two questions.</p>
  
  <p>How to define array of enum property in YML?</p>
  
  <p>How to define map property enum as key and boolean as value in YML?</p>
  
  <p>Let me know is it possible or is there any workaround? Currently, I defined enum class in java and typescrtipt and pass it as string. Thanks. </p>
  
  <pre class="lang-yaml prettyprint-override"><code>DataInfo:
         type: object
         properties:
            enumTest:        -- works fine
              type: string
              enum:
                - one
                - two   
             enumTestArray:   --failing to generate code
                type: array
                items:
                   type: string
                   enum:
                    - one
                     -two  
                testMap:   -- works fines generate Map&lt;String, Boolean&gt; and { [key: string]: boolean; };
                  type: object         
                  additionalProperties:
                      type: boolean 
  </code></pre>
  
  <p><a href="https://swagger.io/docs/specification/data-models/enums/" rel="nofollow noreferrer">swagger enum doc</a></p>
  
  <p><a href="https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#model-with-mapdictionary-properties" rel="nofollow noreferrer">Map Property</a></p>
  
  <p><strong>Updated:</strong></p>
  
  <p>Related to first question: Define array of enum property. swagger-codegen-maven-plugin generate invalid java class file as follows: Look like and issue with  generating &lt;, > and " characters.</p>
  
  <pre class="lang-java prettyprint-override"><code>@XmlType(name="List&amp;lt;EnumTestArrayEnum&amp;gt;")
  @XmlEnum
  public enum List&amp;lt;EnumTestArrayEnum&amp;gt; {
  
      ONE(List&amp;lt;String&amp;gt;.valueOf("&amp;quot;one&amp;quot;")), TWO(List&amp;lt;String&amp;gt;.valueOf("&amp;quot;two&amp;quot;"));
  
  
      private List&amp;lt;String&amp;gt; value;
  
      List&amp;lt;EnumTestArrayEnum&amp;gt; (List&amp;lt;String&amp;gt; v) {
          value = v;
      }
  
      public String value() {
          return value;
      }
  
      public static List&amp;lt;EnumTestArrayEnum&amp;gt; fromValue(String v) {
          return valueOf(v);
      }
  }
  </code></pre>