Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 86d5739

Browse files
jdesrosiersRelequestual
authored andcommitted
Add propertyDependencies keyword
1 parent 7074313 commit 86d5739

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
@@ -2265,6 +2265,25 @@
22652265
Omitting this keyword has the same behavior as an empty object.
22662266
</t>
22672267
</section>
2268+
<section title="propertyDependencies">
2269+
<t>
2270+
This keyword specifies subschemas that are evaluated if the instance is
2271+
an object and contains a certain property with a certain string value.
2272+
</t>
2273+
<t>
2274+
This keyword's value MUST be an object. Each value in the object MUST be
2275+
an object whose values MUST be valid JSON Schemas.
2276+
</t>
2277+
<t>
2278+
If the outer object key is a property in the instance and the inner
2279+
object key is equal to the value of that property, the entire instance
2280+
must validate against the schema. Its use is dependent on the presence
2281+
and value of the property.
2282+
</t>
2283+
<t>
2284+
Omitting this keyword has the same behavior as an empty object.
2285+
</t>
2286+
</section>
22682287
</section>
22692288
</section>
22702289
<section title="Keywords for Applying Subschemas to Child Instances">
@@ -3859,6 +3878,7 @@ https://example.com/schemas/common#/$defs/count/minimum
38593878
<list style="symbols">
38603879
<t>"contains" now applies to objects as well as arrays</t>
38613880
<t>Remove bookending requirement for "$dynamicRef"</t>
3881+
<t>Add "propertyDependencies" keyword</t>
38623882
</list>
38633883
</t>
38643884
<t hangText="draft-bhutton-json-schema-00">

‎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)

AltStyle によって変換されたページ (->オリジナル) /