Skip to content

tuple types (prefixItems) not supported #965

@codebutler

Description

@codebutler

Describe the bug

Error with the schema below:

type array must have items defined

items is not required when using prefixItems, see: https://json-schema.org/understanding-json-schema/reference/array#tupleValidation

OpenAPI Spec File

openapi: 3.1.0
info:
  title: Example
  description: 'Example'
  version: 1.0.0
paths: {}
components:
  schemas:
    Test:
      properties:
        example_tuple:
          items:
            maxItems: 2
            minItems: 2
            prefixItems:
              - type: string
              - {}
            type: array
          title: Example tuple
          type: array
          uniqueItems: true
      title: Test
      type: object

Desktop (please complete the following information):

  • OS: macOS 14.3
  • Python Version: 3.12.1
  • openapi-python-client version: 0.17.2

Additional context

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