Skip to content

Commit 0827f5c

Browse files
committed
Add propertyDependencies keyword
1 parent a5e41d6 commit 0827f5c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

jsonschema-core.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2300,6 +2300,25 @@
23002300
Omitting this keyword has the same behavior as an empty object.
23012301
</t>
23022302
</section>
2303+
<section title="propertyDependencies">
2304+
<t>
2305+
This keyword specifies subschemas that are evaluated if the instance is
2306+
an object and contains a certain property with a certain string value.
2307+
</t>
2308+
<t>
2309+
This keyword's value MUST be an object. Each value in the object MUST be
2310+
an object whose values MUST be valid JSON Schemas.
2311+
</t>
2312+
<t>
2313+
If the outer object key is a property in the instance and the inner
2314+
object key is equal to the value of that property, the entire instance
2315+
must validate against the schema. Its use is dependent on the presence
2316+
and value of the property.
2317+
</t>
2318+
<t>
2319+
Omitting this keyword has the same behavior as an empty object.
2320+
</t>
2321+
</section>
23032322
</section>
23042323
</section>
23052324
<section title="Keywords for Applying Subschemas to Child Instances">
@@ -3900,6 +3919,7 @@ https://example.com/schemas/common#/$defs/count/minimum
39003919
<t>"contains" now applies to objects as well as arrays</t>
39013920
<t>Use IRIs instead of URIs</t>
39023921
<t>Remove bookending requirement for "$dynamicRef"</t>
3922+
<t>Add "propertyDependencies" keyword</t>
39033923
</list>
39043924
</t>
39053925
<t hangText="draft-bhutton-json-schema-01">

meta/applicator.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@
2929
"additionalProperties": { "$dynamicRef": "#meta" },
3030
"default": {}
3131
},
32+
"propertyDependencies": {
33+
"type": "object",
34+
"additionalProperties": {
35+
"type": "object",
36+
"additionalProperties": { "$dynamicRef": "#meta" },
37+
"default": {}
38+
},
39+
"default": {}
40+
},
3241
"propertyNames": { "$dynamicRef": "#meta" },
3342
"if": { "$dynamicRef": "#meta" },
3443
"then": { "$dynamicRef": "#meta" },

0 commit comments

Comments
 (0)