unevaluatedProperties now cascade infinitely down their leaf when strict validation mode is on
This commit is contained in:
@ -355,7 +355,16 @@ pub fn additional_properties_schemas() -> JsonB {
|
||||
|
||||
pub fn unevaluated_properties_schemas() -> JsonB {
|
||||
let enums = json!([]);
|
||||
let types = json!([]);
|
||||
let types = json!([{
|
||||
"name": "nested_for_uneval",
|
||||
"schemas": [{
|
||||
"$id": "nested_for_uneval",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"deep_prop": { "type": "string" }
|
||||
}
|
||||
}]
|
||||
}]);
|
||||
let puncs = json!([
|
||||
{
|
||||
"name": "simple_unevaluated_test",
|
||||
@ -396,6 +405,29 @@ pub fn unevaluated_properties_schemas() -> JsonB {
|
||||
},
|
||||
"unevaluatedProperties": false
|
||||
}]
|
||||
},
|
||||
{
|
||||
"name": "nested_unevaluated_test",
|
||||
"public": true, // To trigger strict mode
|
||||
"schemas": [{
|
||||
"$id": "nested_unevaluated_test.request",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"non_strict_branch": {
|
||||
"type": "object",
|
||||
"unevaluatedProperties": true, // The magic switch
|
||||
"properties": {
|
||||
"some_prop": { "$ref": "nested_for_uneval" }
|
||||
}
|
||||
},
|
||||
"strict_branch": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"another_prop": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user