openapi: 3.0.1 info: title: Sample API with an Array. version: "1.0" servers: - url: http://localhost:8080 paths: /sample-api-with-array: get: responses: "200": description: Ok. content: application/json: schema: $ref: "#/components/schemas/ResponseSchema" components: schemas: ResponseSchema: type: object properties: property-of-array-type: type: array items: type: object properties: leaf-attribute: type: string # # Sample Response JSON: # # { # "property-of-array-type": [ # { # "leaf-attribute": "value1" # }, # { # "leaf-attribute": "value2" # }, # { # "leaf-attribute": "value3" # } # ] # } #