Skip to content

Commit f2f4141

Browse files
committed
Removed schemas-can-be-URI references.
Tweaked the wording in "items"
1 parent 4cbb550 commit f2f4141

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

draft-zyp-json-schema-03.xml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,9 @@ Content-Type: application/json;
264264

265265
<section title="Core Schema Definition">
266266
<t>A JSON Schema is a JSON Object that defines various attributes
267-
of the instance and defines it's usage and valid values. JSON
267+
(including usage and valid values) of a JSON value. JSON
268268
Schema has recursive capabilities; there are a number of elements
269-
in the structure that allow for a nested JSON Schema or URI
270-
referencing a schema. Schema referencing URIs can be relative
271-
or absolute and the target of the URI SHOULD be treated as
272-
the schema for the given element in the schema structure.
273-
</t>
274-
269+
in the structure that allow for nested JSON Schemas.</t>
275270

276271
<t>An example JSON Schema definition could look like:</t>
277272
<figure>
@@ -317,7 +312,7 @@ included in a union, null values are not allowed (the primitives listed above do
317312
</list>
318313
If the property is not defined or is not in this list, then any type of value is acceptable. Other type values MAY be used for custom purposes, but minimal validators of the specification implementation can allow any instance value on unknown type values.
319314
</t>
320-
<t hangText="Union Types">An array of two or more simple type definitions. Each item in the array MUST be a simple type definition, a schema, or a URI for a schema. The instance value is valid if it is of the same type as one of the simple type definitions in the array, or if it is valid by one of the schemas (or a schema referenced by a URI) in the array.
315+
<t hangText="Union Types">An array of two or more simple type definitions. Each item in the array MUST be a simple type definition or a schema. The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array.
321316
</t>
322317
</list>
323318
</t>
@@ -329,19 +324,21 @@ If the property is not defined or is not in this list, then any type of value is
329324
</figure>
330325
</section>
331326
<section title="properties" anchor="properties">
332-
<t>This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema or URI referring to a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order.</t>
327+
<t>This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order.</t>
333328
</section>
334329
<section title="patternProperties">
335-
<t>This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema or URI reference to a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.</t>
330+
<t>This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.</t>
336331
</section>
337-
<section title="additionalProperties">
338-
<t>This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema, a URI referencing a schema, or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties.</t>
332+
<section title="additionalProperties" anchor="additionalProperties">
333+
<t>This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties.</t>
339334
</section>
340335
<section title="items">
341-
<t>This MUST be a schema or URI referring to a schema or an array of schemas (schema or URI referring to a schema). When this is a schema and the instance value is an array, all the items in the array MUST conform to this schema or schema referenced by the URI. When this is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the additionalItems attribute using the same rules as "additionalProperties" for objects. The default value is an empty schema which allows any value for items in the instance array.</t>
336+
<t>This attribute defines the allowed items in an instance array, and MUST be a schema or an array of schemas. The default value is an empty schema which allows any value for items in the instance array.</t>
337+
<t>When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema.</t>
338+
<t>When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the <xref target="additionalItems">"additionalItems"</xref> attribute using the same rules as <xref target="additionalProperties">"additionalProperties"</xref> for objects.</t>
342339
</section>
343-
<section title="additionalItems">
344-
<t>This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema (or a URI referencing a schema) that defines the schema of the additional items.</t>
340+
<section title="additionalItems" anchor="additionalItems">
341+
<t>This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema that defines the schema of the additional items.</t>
345342
</section>
346343
<section title="required">
347344
<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>
@@ -430,10 +427,10 @@ The dependency value can take one of two forms:
430427
<t>This attribute defines what value the number instance must be divisible by with no remainder. (The result of the division must be an integer.)</t>
431428
</section>
432429
<section title="disallow">
433-
<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 or a URI referencing a schema in the array, then this instance is not valid.</t>
430+
<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>
434431
</section>
435432
<section title="extends">
436-
<t>The value of this property MUST be another schema or a URI referencing a 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 properties, constrain existing properties, 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":
433+
<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":
437434
<figure>
438435
<artwork><![CDATA[
439436
{
@@ -456,7 +453,7 @@ The dependency value can take one of two forms:
456453
</section>
457454
<section title="id">
458455
<t>
459-
This defines the URI of this schema (the target is effectively
456+
This defines the URI of this schema (this attribute is effectively
460457
a "self" link). This URI MAY be relative or absolute. If the URI
461458
is relative, it SHOULD be resolved against the URI used to retrieve this schema.
462459
</t>
@@ -929,7 +926,6 @@ instead of numbers</t>
929926
<list style="hanging">
930927
<t hangText="draft-03">
931928
<list style="symbols">
932-
<t>Defined referencing schemas by URI for all elements that accept schemas.</t>
933929
<t>Added example and verbiage to "extends" attribute.</t>
934930
<t>Defined slash-delimited to use a leading slash.</t>
935931
<t>Made "root" a relation instead of an attribute.</t>

0 commit comments

Comments
 (0)