Skip to content

Commit

Permalink
Merge branch 'main' of github.com:intelligence-ai/learnjsonschema.com
Browse files Browse the repository at this point in the history
  • Loading branch information
jviotti committed Dec 24, 2024
2 parents 3d1b880 + bfad479 commit 222c667
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/2020-12/unevaluated/unevaluatedProperties.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ It's crucial to understand what evaluation means in this context.
{ "keyword": "/patternProperties", "instance": "", "value": [ "bar" ] }
{{</instance-annotation>}}

* For the first instace, the annotation result of `properties` is [ "foo" ], and the annotation result of `patternProperties` is [ "bar" ]. However, the 'fooBar' property remains unevaluated, so the `unevaluatedProperties` subschema applies to it. This subschema fails (as any instance against a false schema is always invalid), leading to the failure of the entire schema.
* For the second instace, the annotation result of `properties` is [ "foo" ], and the annotation result of `patternProperties` is [ "bar" ]. No properties remain unevaluated; hence, the instance is considered valid.
* For the first instance, the annotation result of `properties` is [ "foo" ], and the annotation result of `patternProperties` is [ "bar" ]. However, the 'fooBar' property remains unevaluated, so the `unevaluatedProperties` subschema applies to it. This subschema fails (as any instance against a false schema is always invalid), leading to the failure of the entire schema.
* For the second instance, the annotation result of `properties` is [ "foo" ], and the annotation result of `patternProperties` is [ "bar" ]. No properties remain unevaluated; hence, the instance is considered valid.

{{<schema `Schema with 'unevaluatedProperties', 'properties', and 'patternProperties', with unevaluatedProperties set to an object subschema`>}}
{
Expand Down

0 comments on commit 222c667

Please sign in to comment.