Skip to content

Commit 72e4dc1

Browse files
committed
Rework requiredDependencies to be more consistent
Use language based on a combination of "required" and "properties", and make the simple description (the 2nd paragraph) more clear.
1 parent a31684c commit 72e4dc1

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

jsonschema-validation.xml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -452,15 +452,19 @@
452452

453453
<section title="requiredDependencies">
454454
<t>
455-
This keyword specifies property requirements that are conditional
456-
based on the presence of other properties.
455+
The value of this keyword MUST be an object. Properties in
456+
this object, if any, MUST be arrays. Elements in each array,
457+
if any, MUST be strings, and MUST be unique.
457458
</t>
458459
<t>
459-
This keyword's value MUST be an object. Each property specifies
460-
a dependent requirement, which MUST be an array. Each element
461-
in the array, if any, MUST be a string, and MUST be unique.
462-
If the dependency key is a property in the instance, each of the items
463-
in the dependency value MUST be a property that exists in the instance.
460+
This keyword specifies properties that are required if a specific
461+
other property is present.
462+
</t>
463+
<t>
464+
Validation succeeds if, for each name that appears in both
465+
the instance and as a name within this keyword's value, every
466+
item in the corresponding array is also the name of a property
467+
in the instance.
464468
</t>
465469
<t>
466470
Omitting this keyword has the same behavior as an empty object.

0 commit comments

Comments
 (0)