Swagger Codegen: Inheritance and Composition not working as expected
<p>I have the following short YAML:</p>

<pre><code># Transaction Request object with minimal information that we need
  Parent:
    required:
  - a
  - b
  - c
properties:
  a:
    type: number
    format: double
  b:
    type: string
  c:
    type: string

# Full transaction
Child:
required:
  - a 
  - b
  - c
allOf:
  - $ref: "#/definitions/Parent"
properties:    
  date: 
    type: string 
    format: date-time
  state: 
    type: string 
    enum: 
      - 1
      - 2
      - 3
</code></pre>

<p>In Swagger UI and Editor these objects show up as I wish them to: <code>Child</code> inherits the <code>a</code>,<code>b</code> and <code>c</code> fields from <code>Parent</code> and has a few additional ones.</p>

<p>I would have expected:</p>

<pre><code>public class Parent {

  private Double a;
  private String b;
  private String c;

  ...}
</code></pre>

<p>and</p>

<pre><code> public class Child extends Parent {

 // Superclass fields as well as:
 private Date date;
 private enum State {...};

  ...}
</code></pre>

<p>However, while the <code>Parent</code> class looked as expected, my <code>Child</code> class consisted of the following:</p>

<pre><code>public class Child   {



@Override
public boolean equals(Object o) {
if (this == o) {
  return true;
}
if (o == null || getClass() != o.getClass()) {
  return false;
}
Child child = (Child) o;
return true;
}

... }
</code></pre>

<p>Which lacks even <code>extends</code>. When using a <code>discriminator</code> it works, but I don't really want Polymorphism - just plain inheritance. How can I accomplish this with Swagger Codegen?</p>

<hr>

<p>Relevant <code>pom.xml</code> entry:</p>

<pre><code>            &lt;plugin&gt;
                &lt;groupId&gt;io.swagger&lt;/groupId&gt;
                &lt;artifactId&gt;swagger-codegen-maven-plugin&lt;/artifactId&gt;
                &lt;version&gt;2.2.2-SNAPSHOT&lt;/version&gt;

                &lt;configuration&gt;
                    &lt;inputSpec&gt;${project.basedir}/src/main/resources/test.yaml&lt;/inputSpec&gt;
                    &lt;language&gt;jaxrs-resteasy&lt;/language&gt;
                    &lt;output&gt;${project.build.directory}/generated-sources/payment&lt;/output&gt;

                    &lt;configOptions&gt;
                        &lt;sourceFolder&gt;src/java/main&lt;/sourceFolder&gt;
                        &lt;dateLibrary&gt;java8&lt;/dateLibrary&gt;
                    &lt;/configOptions&gt;

                    &lt;groupId&gt;net.product&lt;/groupId&gt;
                    &lt;artifactId&gt;product_api&lt;/artifactId&gt;
                    &lt;modelPackage&gt;net.product.product_api.model&lt;/modelPackage&gt;
                    &lt;invokerPackage&gt;net.product.product_api&lt;/invokerPackage&gt;
                    &lt;apiPackage&gt;net.product.product_api&lt;/apiPackage&gt;
                &lt;/configuration&gt;

                &lt;executions&gt;

                    &lt;execution&gt;
                        &lt;id&gt;generate-server-stubs&lt;/id&gt;
                        &lt;goals&gt;
                            &lt;goal&gt;generate&lt;/goal&gt;
                        &lt;/goals&gt;
                        &lt;configuration&gt;
                        &lt;/configuration&gt;
                    &lt;/execution&gt;

                &lt;/executions&gt;

            &lt;/plugin&gt;
</code></pre>