Skip to content

Tests for uniqueItems only test arrays with two items #524

Closed
@DrGFreeman

Description

@DrGFreeman

The tests for non-unique items with uniqueItems enabled only test arrays with two items, e.g.:

{
"description": "non-unique array of arrays is invalid",
"data": [["foo"], ["foo"]],
"valid": false
},

In some validation library implementations, having unique first two first items can result in the validation to pass (e.g.: python-jsonschema/jsonschema#866). In this case, addition of a third item in the array would allow testing that the validation is performed on all elements of the array:

{
    "description": "non-unique array of arrays is invalid",
    "data": [["foo"], ["bar"], ["foo"]],
    "valid": false
},

Also, there is no test case for non-unique string items (only numeric and array items).

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