title: How do you have the maven swagger codegen plugin generate Java classes using inheritance?
body: <p>In our swagger.yaml file, we have a definition <code>Cat</code> that uses <code>allOf</code> to include all properties of <code>Pet</code>. </p>
  
  <pre><code>Cat:
    allOf:
      - $ref: '#/definitions/Pet'
      - type: object
        properties:
        # ...
  </code></pre>
  
  <p>The <strong>expectation</strong> is that when generating Java sources, we get </p>
  
  <pre><code>public class Cat extends Pet {
  </code></pre>
  
  <p>This works when using the <a href="https://editor.swagger.io" rel="nofollow noreferrer">Swagger Editor</a>. </p>
  
  <p>When using <code>swagger-codegen-maven-plugin</code> with no <code>configOptions</code> set, we get the following:</p>
  
  <pre><code>public class Cat {
  </code></pre>
  
  <p><code>Cat</code> implements all of <code>Pet</code>'s properties itself, instead of extending it. </p>
  
  <p><strong>How do you tell the <code>swagger-codegen-maven-plugin</code> to use Java with inheritance (i.e. <code>extends</code>)?</strong> (We tried both spring and java as languages.) </p>
  
  <p>Here's a sample swagger.yaml file:</p>
  
  <pre><code>swagger: '2.0'
  
  info:
    version: 1.0.0
    title: simple inheritance
  
  tags:
    - name: "pet"
  
  paths:
    /cat:
      put:
        tags:
          - "pet"
        operationId: "updateCat"
        consumes:
          - "application/json"
        parameters:
          - in: "body"
            name: "body"
            required: true
            schema:
              $ref: "#/definitions/Cat"
        responses:
          200:
            description: Nada
  
  definitions:
    Pet:
      type: "object"
      required:
        - "name"
      properties:
        name:
          type: "string"
          example: "doggie"
    Cat:
      allOf:
        - $ref: '#/definitions/Pet'
        - type: object
          properties:
            huntingSkill:
              type: string
          required:
            - huntingSkill
  </code></pre>