# anyOf with Properties in Array Item

`GET /anyof-with-properties-in-array-item`

Tags: `anyOf`

Schema:
```yaml
type: array
items:
  type: object
  anyOf:
    - type: object
      title: Item
      properties:
        orderNo:
          type: string
          example: '123456'
    - type: object
      title: Error
      properties:
        error:
          type: string
          example: 'Invalid order number'
  properties:
    name:
      type: string
      example: pencil
  required:
    - orderNo
```

## Responses

### 200

Successful response

#### Content type: `application/json`

Schema: `object[]`

- One or more of these options:
  - Option 1: Item (object)
    - `[].name` (string, example: `pencil`)
    - `[].orderNo` (string, required, example: `123456`)
  - Option 2: Error (object)
    - `[].name` (string, example: `pencil`)
    - `[].error` (string, example: `Invalid order number`)
