title: open-api generator for python not working for subtypes or anyOf/allOf
body: <p>Here's my yaml (<strong>setup.yml</strong>):</p>
  <pre class="lang-yaml prettyprint-override"><code>openapi: 3.0.2
  info:
    title: &quot;My Setup&quot;
    description: &quot;Some old nonsense&quot;
    version: 1.0.0
    contact:
      name: &quot;Tom Riddle&quot;
      email: &quot;tom@not-a-muggle.co.uk&quot;
      url: &quot;https://deatheaters-anonymous.org&quot;
    termsOfService: MIT
  servers: []
  paths: {}
  components:
    schemas:
      CodeValue:
        type: integer
        minimum: 200
        maximum: 302
      AgeGroup:
        type: string
        enum: [baby, child, teen, adult, old]
      Age:
        anyOf:
          - type: string
            enum: [baby, child, teen, adult, old]
          - type: integer
  </code></pre>
  <p>Running openapi-generator (downloaded from <a href="https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1" rel="nofollow noreferrer">https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1</a> ---&gt; <strong>openapi-generator-cli-4.3.1.jar</strong> and run the the CLI using <code>java -jar openapi-generator-cli.jar generate -g python -i setup.yml -o src</code>) I obtain the following result:</p>
  <ol>
  <li><code>src/openapi_client/models</code> contains <code>age.py</code> and <code>age_group.py</code> ... BUT NO <code>code_value.py</code> ---&gt; <strong>why??!</strong></li>
  <li>the file <code>age_group.py</code> looks fine. The enum is there, I can see the values, <em>etc.</em> Great.</li>
  <li>the file <code>age.py</code> does not even resemble the the yaml definition (see below). There is no checking if the value is an integer or string (ie <code>anyOf</code> is not properly implemented), and no trace of mention of the enum. In fact it is nowhere to be found in the generated project structure. ---&gt; <strong>why??!</strong></li>
  </ol>
  <pre class="lang-py prettyprint-override"><code># coding: utf-8
  
  &quot;&quot;&quot;
      My Setup
  
      Some old nonsense  # noqa: E501
  
      The version of the OpenAPI document: 1.0.0
      Contact: tom@not-a-muggle.co.uk
      Generated by: https://openapi-generator.tech
  &quot;&quot;&quot;
  
  
  import pprint
  import re  # noqa: F401
  
  import six
  
  from openapi_client.configuration import Configuration
  
  
  class Age(object):
      &quot;&quot;&quot;NOTE: This class is auto generated by OpenAPI Generator.
      Ref: https://openapi-generator.tech
  
      Do not edit the class manually.
      &quot;&quot;&quot;
  
      &quot;&quot;&quot;
      Attributes:
        openapi_types (dict): The key is attribute name
                              and the value is attribute type.
        attribute_map (dict): The key is attribute name
                              and the value is json key in definition.
      &quot;&quot;&quot;
      openapi_types = {
      }
  
      attribute_map = {
      }
  
      def __init__(self, local_vars_configuration=None):  # noqa: E501
          &quot;&quot;&quot;Age - a model defined in OpenAPI&quot;&quot;&quot;  # noqa: E501
          if local_vars_configuration is None:
              local_vars_configuration = Configuration()
          self.local_vars_configuration = local_vars_configuration
          self.discriminator = None
  
      def to_dict(self):
          &quot;&quot;&quot;Returns the model properties as a dict&quot;&quot;&quot;
          result = {}
  
          for attr, _ in six.iteritems(self.openapi_types):
              value = getattr(self, attr)
              if isinstance(value, list):
                  result[attr] = list(map(
                      lambda x: x.to_dict() if hasattr(x, &quot;to_dict&quot;) else x,
                      value
                  ))
              elif hasattr(value, &quot;to_dict&quot;):
                  result[attr] = value.to_dict()
              elif isinstance(value, dict):
                  result[attr] = dict(map(
                      lambda item: (item[0], item[1].to_dict())
                      if hasattr(item[1], &quot;to_dict&quot;) else item,
                      value.items()
                  ))
              else:
                  result[attr] = value
  
          return result
  
      def to_str(self):
          &quot;&quot;&quot;Returns the string representation of the model&quot;&quot;&quot;
          return pprint.pformat(self.to_dict())
  
      def __repr__(self):
          &quot;&quot;&quot;For `print` and `pprint`&quot;&quot;&quot;
          return self.to_str()
  
      def __eq__(self, other):
          &quot;&quot;&quot;Returns true if both objects are equal&quot;&quot;&quot;
          if not isinstance(other, Age):
              return False
  
          return self.to_dict() == other.to_dict()
  
      def __ne__(self, other):
          &quot;&quot;&quot;Returns true if both objects are not equal&quot;&quot;&quot;
          if not isinstance(other, Age):
              return True
  
          return self.to_dict() != other.to_dict()
  </code></pre>