# anyOf with nested oneOf and properties at same level

`POST /anyof-nested-oneof-with-properties`

Tags: `anyOf`

Schema demonstrating complex nested structures where:
- An anyOf contains multiple oneOf arrays
- oneOf schemas have properties without explicit type
- A schema has both oneOf and properties at the same level (layer3)

This pattern is similar to the ethernet-interfaces schema.

Schema:
```yaml
type: object
properties:
  id:
    type: string
  name:
    type: string
anyOf:
  - oneOf:
    - title: tap
      properties:
        tap:
          type: object
          default: {}
    - title: layer2
      required:
        - layer2
      properties:
        layer2:
          type: object
          properties:
            vlan-tag:
              type: integer
    - title: layer3
      required:
        - layer3
      properties:
        layer3:
          type: object
          oneOf:
            - title: static
              type: object
              properties:
                ip:
                  type: array
                  items:
                    type: string
            - title: dhcp
              type: object
              properties:
                dhcp-enabled:
                  type: boolean
          properties:
            mtu:
              type: integer
              default: 1500
            management-profile:
              type: string
  - oneOf:
    - title: folder
      type: object
      properties:
        folder:
          type: string
      required:
        - folder
    - title: snippet
      type: object
      properties:
        snippet:
          type: string
      required:
        - snippet
```

## Request body (required)

### Content type: `application/json`

Schema: `any of`

- One or more of these options:
  - Option 1 (one of)
    - Exactly one of these options:
      - Option 1: tap (object)
        - `id` (string, example: `123e4567-e89b-12d3-a456-426655440000`)
          UUID of the resource
        - `name` (string, example: `ethernet1/1`)
          Interface name
        - `tap` (object)
      - Option 2: layer2 (object)
        - `id` (string, example: `123e4567-e89b-12d3-a456-426655440000`)
          UUID of the resource
        - `name` (string, example: `ethernet1/1`)
          Interface name
        - `layer2` (object, required)
          - `layer2.vlan-tag` (integer, >= 1, <= 4094)
            Assign interface to VLAN tag
      - Option 3: layer3 (object)
        - `id` (string, example: `123e4567-e89b-12d3-a456-426655440000`)
          UUID of the resource
        - `name` (string, example: `ethernet1/1`)
          Interface name
        - `layer3` (one of, required)
          - Exactly one of these options:
            - Option 1: static (object)
              - `layer3.mtu` (integer, >= 576, <= 9216, default: `1500`)
                Maximum transmission unit
              - `layer3.management-profile` (string, max length: 31)
                Interface management profile
              - `layer3.ip` (string[])
                Interface IP addresses
                - `layer3.ip[]` (string, example: `192.168.1.1/24`)
            - Option 2: dhcp (object)
              - `layer3.mtu` (integer, >= 576, <= 9216, default: `1500`)
                Maximum transmission unit
              - `layer3.management-profile` (string, max length: 31)
                Interface management profile
              - `layer3.dhcp-enabled` (boolean, default: `true`)
                Enable DHCP client
  - Option 2 (one of)
    - Exactly one of these options:
      - Option 1: folder (object)
        - `id` (string, example: `123e4567-e89b-12d3-a456-426655440000`)
          UUID of the resource
        - `name` (string, example: `ethernet1/1`)
          Interface name
        - `folder` (string, required, max length: 64, pattern: `^[a-zA-Z\d-_\. ]+$`, example: `My Folder`)
          The folder in which the resource is defined
      - Option 2: snippet (object)
        - `id` (string, example: `123e4567-e89b-12d3-a456-426655440000`)
          UUID of the resource
        - `name` (string, example: `ethernet1/1`)
          Interface name
        - `snippet` (string, required, max length: 64, pattern: `^[a-zA-Z\d-_\. ]+$`, example: `My Snippet`)
          The snippet in which the resource is defined

## Responses

### 201

Created

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

Schema: `object`

- `id` (string)
- `name` (string)
