Skip to content

Support prefixItems for tuple validation #543

Open
@isti115

Description

@isti115

From the JSON Schema 2020-12 Release Notes:

The items and additionalItems keywords have been replaced with prefixItems and items where prefixItems has the same functionality as the array-of-schemas for of the old items and the new items keyword has the same functionality as the old additionalItems keyword.

For an example with more explanation:
https://json-schema.org/understanding-json-schema/reference/array.html#tuple-validation

As per #1 (which has a broken link by the way), here is the respective file from the official test suite:
https://github.com/json-schema-org/JSON-Schema-Test-Suite/blob/main/tests/draft2020-12/prefixItems.json

In case there is interest in resolving this issue, I would be willing to look into the code (I've already checked the relevant parts of parsing and generation) and try to provide a pull request for it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions