Open AgniveshChaubey opened 8 months ago
I agree that it's wrong, but I think the test is wrong, not the description. The test should be updated to match the description.
The test case is right, technically (but there may also be an error in expressing the intent).
bar
is never defined, so in that regard, the test is correct.
However, the test might have meant baz
instead of bar
. In that case, /else
is skipped when /if
is true. Because baz
is defined only in the else
subschema (which isn't evaluated), it remains unevaluated.
You're right, but that's not what I meant. Look at all the descriptions for all the tests. It's a matrix of the possibilities of two variables: (1) if result (2) unevaluated properties result.
The test should be changed to actually test what the description says otherwise it's just a another test for "when if is true and has unevaluated properties", which is already covered.
Reference:
https://github.com/json-schema-org/JSON-Schema-Test-Suite/blob/bf0360f4b7c51b8f968aabe7f3f49e12b120fc85/tests/draft2020-12/unevaluatedProperties.json#L529
Schema:
Instance:
The description of the above test states that it has no unevaluated properties, but isn't the
bar
property here unevaluated?