swagger: "2.0"

info:
  title: Discriminator
  description: Discriminator bug example
  version: 0.0.1

schemes:
  - http

consumes:
  - application/json
produces:
  - application/json

definitions:

  Id:
    type: object
    discriminator: type
    required:
      - type
      - id
    properties:
      type:
        type: string
      id:
        type: integer

  Foo:
    type: object
    allOf:
      - $ref: "#/definitions/Id"

  Bar:
    type: object
    properties:
      bar:
        type: string

  Awol:
    type: object
    allOf:
      - $ref: "#/definitions/Foo"
      - $ref: "#/definitions/Bar"

paths:

  /awol:
    get:
      operationId: awol
      summary: get awol
      responses:
        200:
          description: awol
          schema:
            $ref: "#/definitions/Awol"
