Skip to content

prefixItems with the same minItems and maxItems value should generate tuples #285

@brookjordan

Description

@brookjordan

For example, if we want a list of lat, lon coordinates, this:

type: array
items:
  type: array
  minItems: 2
  maxItems: 2
  prefixItems:
    - number
    - number

should generate:

[number, number][];

rather than the current:

any[][]

For now the closest we seem to be able to get is:

type: array
items:
  type: array
  items:
    type: number

generating:

number[][]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions