Skip to content

allOf breaks CHECK_MODE_TYPE_CAST #334

@pcjacobse

Description

@pcjacobse

When validating simple input data (GET or POST) I use CHECK_MODE_TYPE_CAST for validating.
This work good when doing simple check, but when nested in allOf the validation breaks.

Schema:

{
  "properties": {
    "test": {
      "type": "integer"
    }
  }
}

Data:

{
  "test": "1"
}

Result: OK

But with the following schema:

{
  "properties": {
    "test": {
      "allOf": [
        {
          "type": "integer"
        }
      ]
    }
  }
}

Result: String value found, but an integer is required + Failed to match all schemas

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