You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-zyp-json-schema-03.xml
+10-20Lines changed: 10 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -337,26 +337,15 @@ If the property is not defined or is not in this list, than any type of value is
337
337
<sectiontitle="required">
338
338
<t>This attribute indicates if the instance must have a value, and not be undefined. This is false by default, making the instance optional.</t>
339
339
</section>
340
-
<sectiontitle="requires">
341
-
<t>If this attribute value is a string, then the containing/parent object of the validating instance MUST have a property with a name of the attribute value in order to validate.
342
-
If this attribute value is a schema, then the containing/parent object of the validating instance MUST be validated against the provided schema.</t>
343
-
<figure>
344
-
<preamble>For example, for the following schema:</preamble>
345
-
<artwork><![CDATA[
346
-
{
347
-
"properties" : {
348
-
"state":{
349
-
"optional":true
350
-
},
351
-
"town":{
352
-
"requires":"state",
353
-
"optional":true
354
-
}
355
-
}
356
-
}
357
-
]]></artwork>
358
-
<postamble>An instance MUST include a state property if a town property is included. If a town property is not included, the state property is optional.</postamble>
359
-
</figure>
340
+
<sectiontitle="dependencies">
341
+
<t>This attribute is an object that defines the requirements of a property on an instance object. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value").</t>
342
+
<t>
343
+
The dependency value can take one of two forms:
344
+
<liststyle="hanging">
345
+
<thangText="Simple Dependency">If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array.</t>
346
+
<thangText="Schema Dependency">If the dependency value is a schema, then the instance object MUST be valid against the schema.</t>
347
+
</list>
348
+
</t>
360
349
</section>
361
350
<sectiontitle="minimum">
362
351
<t>This attribute defines the minimum value of the instance property when the type of the instance value is a number.</t>
@@ -938,6 +927,7 @@ instead of numbers</t>
938
927
<t>Replaced "optional" attribute with "required" attribute.</t>
939
928
<t>Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute.</t>
940
929
<t>Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute.</t>
930
+
<t>Replaced "requires" attribute with "dependencies" attribute.</t>
941
931
<t>Moved "default" and "contentEncoding" attributes to hyper schema</t>
0 commit comments