Skip to content

Commit 6b217dc

Browse files
committed
Improved language for extends
1 parent e561d3d commit 6b217dc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

draft-zyp-json-schema-03.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,11 @@ The dependency value can take one of two forms:
432432
<t>This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid.</t>
433433
</section>
434434
<section title="extends">
435-
<t>The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. The schema MUST NOT define a constraint that conflicts with an extended schema such that no instance may satisfy both schemas. An example of using "extends":
435+
<t>The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints.</t>
436+
<t>Conceptually, the behavior of extends can be seen as validating an
437+
instance against all constraints in the extending schema as well as
438+
the extended schema(s). More optimized implementations that merge
439+
schemas are possible, but are not required. An example of using "extends":
436440
<figure>
437441
<artwork><![CDATA[
438442
{

0 commit comments

Comments
 (0)