openapi: 3.1.0
info:
  title: Multiple DataTypes Per Field Test Case
  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:
    location:
      description: longitude/latitude or city name or zipcode
      type: 
        - object
        - string
        - integer
      properties:
        longitude:
          type: 
            - number
            - string
        latitude:
          type: 
            - number
            - string
    person:
      type: object
      required:
        - id
        - photoUrls
      properties:
        id:
          description: Person ID
          type: 
            - string
            - integer
          minLength: 4
          examples: 
            - 123
        name:
          description: Name of the person
          type: 
            - 'null'
            - string
          minLength: 4
        age:
          description: Age of Person
          type: 
            - integer
            - number
        photoUrls:
          description: One or more URL's
          type: 
            - string
            - array
          maxItems: 20
          minimum: 10
          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
        location:
          summary: Location
          type: 
            - array
            - integer
          minimum: 10  
          minItems: 1
          items:
            $ref: '#/components/schemas/location'
        tag:
          summary: A tag-object or comma separated text
          type: 
            - object
            - string
          properties:
            tagId:
              description: Tag ID
              type: string
            tagDefinition:
              description: Tag properties or plain text
              minLength: 1
              type: 
                - object
                - string
              properties:
                tagText:
                  description: Text inside the tag
                  minLength: 1
                  type: string
                tagColor:
                  description: Color of Tag in RGB or Color Name
                  type: 
                    - string
                    - object
                  properties:
                    red:
                      type: integer
                    green:
                      type: integer
                    blue:
                      type: integer

