openapi: 3.0.3
info:
  description: Nesting of Arrays and Object
  version: 0.0.0
paths:
  /object-as-root:
    get:
      tags:
        - Array and object nesting
      summary: Object as root
      responses:
        200:
          description: Object as root
          content:
            application/json:
              schema:
                type: object
                properties:
                  field-1:
                    type: string
                  field-2:
                    type: number                      
  /array-of-object:
    get:
      tags:
        - Array and object nesting
      summary: Array of Object
      responses:
        200:
          description: Array as root
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    field-1:
                      type: string
                    field-2:
                      type: number
  /array-of-array:
    get:
      tags:
        - Array and object nesting
      summary: Array of array
      responses:
        200:
          description: Array of array
          content:
            application/json:
              schema:
                type: array
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      field-1:
                        type: string
                      field-2:
                        type: number
  /array-of-array-of-primitive:
    get:
      tags:
        - Array and object nesting
      summary: Array of array of number
      responses:
        200:
          description: Array of array of number
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  age:
                    type: integer
                  prices:
                    type: array
                    items:
                      type: array
                      items:
                        type: number

  /array-of-array-3-levels:
    get:
      tags:
        - Array and object nesting
      summary: Array of array (3 Levels)
      responses:
        200:
          description: Array of array (3 Levels)
          content:
            application/json:
              schema:
                type: array
                items:
                  type: array
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        field-1:
                          type: string
                        field-2:
                          type: number
  /array-of-array-4-levels:
    get:
      tags:
        - Array and object nesting
      summary: Array of array (4 Levels)
      responses:
        200:
          description:  Array of array (4 Levels)
          content:
            application/json:
              schema:
                type: array
                items:
                  type: array
                  items:
                    type: array
                    items:
                      type: array
                      items:
                        type: object
                        properties:
                          field-1:
                            type: string
                          field-2:
                            type: number
  /object-containing-array:
    get:
      tags:
        - Array and object nesting
      summary: Object containing array
      responses:
        200:
          description: Object as root
          content:
            application/json:
              schema:
                type: object
                properties:
                  my-array:
                    type: array
                    items:
                      type: object
                      properties:
                        field-1:
                          type: string
                        field-2:
                          type: number
  /array-of-premitives:
    get:
      tags:
        - Array and object nesting
      summary: Array of primitive types
      responses:
        200:
          description: Object as root
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
