-
-
Notifications
You must be signed in to change notification settings - Fork 360
Description
We recently (#1092) added support for contains to apply to objects, but we neglected to define how contains interacts with unevaluatedProperties. It should be consistent with how unevaluatedItems works.
Example
{
"allOf": [
{
"type": "object",
"contains": { "type": "number" }
}
],
"unevaluatedProperties": { "type": "boolean" }
}{ "a": 1, "b": 2, "c": "NaN" }Given this schema and instance, we should expect properties "a" and "b" to be "evaluated" and "c" to be unevaluated. "c" should be validated against the unevaluatedProperties schema and fail because it's not a boolean. However, currently unevaluatedProperties is only defined in terms of properties, patternProperties, additionalProperties, and itself, so contains doesn't create the relevant annotations and all of the properties will be considered unevaluated.
I'll create a PR soon to bring this in sync with the unevaluatedItems behavior.