Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
11.1(EOL)
-
None
Description
The unevaluatedProperties object does not behave as expected when properties are declared in subschemas. Additional key values are not validating properly
SET @unevaluatedProperties_schema= '{ |
"allOf": [
|
{
|
"type": "object",
|
"properties": {
|
"name": { "type": "string" }
|
}
|
}
|
],
|
"properties": {
|
"type": { "enum": ["residential", "business"] }
|
},
|
"required": ["type"],
|
"unevaluatedProperties": false
|
}'; |
Actual result
11.0.2-opt>SELECT JSON_SCHEMA_VALID(@unevaluatedProperties_schema, '{"name": "joe", "type": "business", "dummy" : "hello" }'); |
+-------------------------------------------------------------------------------------------------------------+ |
| JSON_SCHEMA_VALID(@unevaluatedProperties_schema, '{"name": "joe", "type": "business", "dummy" : "hello" }') | |
+-------------------------------------------------------------------------------------------------------------+ |
| 1 |
|
+-------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.000 sec) |
|
11.0.2-opt>
|
Expected result
11.0.2-opt>SELECT JSON_SCHEMA_VALID(@unevaluatedProperties_schema, '{"name": "joe", "type": "business", "dummy" : "hello" }'); |
+-------------------------------------------------------------------------------------------------------------+ |
| JSON_SCHEMA_VALID(@unevaluatedProperties_schema, '{"name": "joe", "type": "business", "dummy" : "hello" }') | |
+-------------------------------------------------------------------------------------------------------------+ |
| 0 |
|
+-------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.000 sec) |
|
11.0.2-opt>
|
Attachments
Issue Links
- is caused by
-
MDEV-27128 Implement JSON Schema Validation FUNCTION
- Closed