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
<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
268
268
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>
275
270
276
271
<t>An example JSON Schema definition could look like:</t>
277
272
<figure>
@@ -317,7 +312,7 @@ included in a union, null values are not allowed (the primitives listed above do
317
312
</list>
318
313
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.
319
314
</t>
320
-
<thangText="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
+
<thangText="Union Types">An array of two or more simple type definitions. Each item in the array MUST be a simple type definitionor 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.
321
316
</t>
322
317
</list>
323
318
</t>
@@ -329,19 +324,21 @@ If the property is not defined or is not in this list, then any type of value is
329
324
</figure>
330
325
</section>
331
326
<sectiontitle="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>
333
328
</section>
334
329
<sectiontitle="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>
336
331
</section>
337
-
<sectiontitle="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>
<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>
339
334
</section>
340
335
<sectiontitle="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 <xreftarget="additionalItems">"additionalItems"</xref> attribute using the same rules as <xreftarget="additionalProperties">"additionalProperties"</xref> for objects.</t>
342
339
</section>
343
-
<sectiontitle="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>
<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>
345
342
</section>
346
343
<sectiontitle="required">
347
344
<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:
430
427
<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>
431
428
</section>
432
429
<sectiontitle="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>
434
431
</section>
435
432
<sectiontitle="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":
437
434
<figure>
438
435
<artwork><![CDATA[
439
436
{
@@ -456,7 +453,7 @@ The dependency value can take one of two forms:
456
453
</section>
457
454
<sectiontitle="id">
458
455
<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
460
457
a "self" link). This URI MAY be relative or absolute. If the URI
461
458
is relative, it SHOULD be resolved against the URI used to retrieve this schema.
462
459
</t>
@@ -929,7 +926,6 @@ instead of numbers</t>
929
926
<liststyle="hanging">
930
927
<thangText="draft-03">
931
928
<liststyle="symbols">
932
-
<t>Defined referencing schemas by URI for all elements that accept schemas.</t>
933
929
<t>Added example and verbiage to "extends" attribute.</t>
934
930
<t>Defined slash-delimited to use a leading slash.</t>
935
931
<t>Made "root" a relation instead of an attribute.</t>
0 commit comments