Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
12.1.1
-
None
-
Unexpected results
Description
JSON_SCHEMA_VALID() is returning incorrect result with JSON having array of objects.
For this schema
{
|
"type": "object", |
"properties": |
{
|
"id": { |
"type": "string", |
"minLength": 1 |
},
|
"arr_fields": { |
"type": "array", |
"items": { |
"type": "object", |
"properties": { |
"field1": { |
"type": "string" |
},
|
"field2": { |
"type": "number" |
}
|
},
|
"required": ["field1"] |
}
|
}
|
}
|
}
|
and the json value
{
|
"id": "zero", |
"arr_fields": [ |
{
|
"field1": "A", |
"field2": 123 |
},
|
{
|
"field1": "B" |
}
|
]
|
}
|
JSON_SCHEMA_VALID(@schema, @value) returns false. Where as https://www.jsonschemavalidator.net/ return true for the same.