Skip to content

bug: type order in 'allOf' has an impact #712

Closed as not planned
Closed as not planned
@kroc702

Description

@kroc702

Hello,
When validate with multiple schema using 'allOf', definition order has a behavior impact.
cf attached code to test
testSchemaValidator2.zip

Correct:

input value: "true"
schema: {
    "allOf": [
        {
            "type": "string"
        },
        {
            "type": "boolean"
        }
    ]
}
value is valid

reverse order lead to incorrect validation:

input value: "true"
schema: {
    "allOf": [
        {
            "type": "boolean"
        },
        {
            "type": "string"
        }
    ]
}
Boolean value found, but a string is required
Failed to match all schemas

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions