Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong validation result for nested objects #366

Open
eyalAlpha opened this issue Jul 6, 2023 · 2 comments
Open

Wrong validation result for nested objects #366

eyalAlpha opened this issue Jul 6, 2023 · 2 comments

Comments

@eyalAlpha
Copy link

eyalAlpha commented Jul 6, 2023

Validation fails to identify data type miss match in nested object, for example:

...
"properties": {
"example": {
        "type": "array",
        "items": {
          "type": "object",
          "map": {
            "key": [
              "string"
            ],
            "value": [
              "number"
            ]
          }
        }
      }}

Should yields validation error on the following input:

{
 "example": [
            {"test1": 1,"test2": "1"}
        ]
}
@ORESoftware
Copy link

why should that cause an error? I dont see the problem

@eyalAlpha
Copy link
Author

eyalAlpha commented Dec 28, 2023

Because the second object is string to string- "1" and not 1.
It's not valid because according t the validation rule, the objects must be string to int.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants