Skip to content

oneOf in array items not working #64

Open
@smarlowucf

Description

@smarlowucf

If you have multiple types (oneOf) of items in an array only the first is validated against:

schema

conditions:
  type: array
  items:
    oneOf:
      - type: object
        required:
          - image
        properties:
          image:
            type: string
        additionalProperties: false
      - type: object
        required:
          - package
        properties:
          package:
            type: array
            items:
              type: string
            minItems: 2

request

{'conditions': [{'image': 'data'}, {'package': ['info', 'data']}]}

Yields: openapi_core.schema.schemas.exceptions.UndefinedSchemaProperty: Undefined properties in schema: {'package'}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions