openapi: 3.1.0
info:
  title: Support for multiple datatypes for each field 
  version: 1.0.1
paths:
  /person:
    post:
      summary: Demonstrates data-types and constraints
      parameters:
        - name: height
          in: query
          description: height (in inches)
          required: true
          example: 70
          schema:
            type: 
              - integer
              - number
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/person'
tags:
  - name: Person
    description: Person Datatype
components:
  schemas:
    person:
      type: object
      required:
        - id
      properties:
        id:
          description: Person ID
          type: 
            - integer
            - number
            - string
          minLength: 4
          minimum: 10
        name:
          type: string
          maxLength: 100
        gender:
          type: 
            - string
            - integer
          enum:
            - male
            - female
            - unknown
          minimum: 4
        location:
          description: location can be null, set using `nullable` property thats supported by OpenAPI `3.0.x`
          type: string
          nullable: true
        age:
          description: Age of Person
          type: integer
          minimum: 21
          exclusiveMaximum: 70
          multipleOf: 5
        photoUrls:
          description: One URL or Array or URLs or set to false
          type: 
            - array
            - boolean
            - string
          maxItems: 20
          items:
            type: string
            format: url
        hobby:
          description: comma separated list of hobbies or an array of object 
          type:
            - string 
            - array
          items:
            type: object
            properties:
              hobbyRank:
                type:
                  - integer
                  - number
              hobbyName:
                type: string


