openapi: 3.0.1
info:
  version: 1.0.0
  title: Example
  license:
    name: MIT
servers:
  - url: http://api.example.xyz/v1
paths:
  /person/display/{personId}:
    get:
      parameters:
        - name: personId
          in: path
          required: true
          description: The id of the person to retrieve
          schema:
            type: string
      operationId: list
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuperMan"
components:
  schemas:
    SuperBaby: # to test single ref (Human) only
      allOf:
      - $ref: '#/components/schemas/Human'
      - required: # without type: object
          - level
        properties:
          gender:
            type: string
          age:
            type: integer 
    SuperBoy: # to test single ref (Human) only
      allOf:
      - $ref: '#/components/schemas/Human'
      - type: object
        required:
          - level
        properties:
          category:
            type: string
          level:
            type: integer 
    SuperMan:
      allOf:
      - $ref: '#/components/schemas/Human'
      - $ref: '#/components/schemas/Hero'
      - type: object
        required:
          - level
        properties:
          category:
            type: string
          level:
            type: integer 
    Hero:
      description: Hero
      type: object
      required:
        - origin
      properties:
        reward:
          type: integer
          format: int64
        origin:
          type: string
    Human:
      description: Human
      type: object
      required:
        - id
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
          example: Tom 
