Initial commit
[yaffs-website] / node_modules / json-schema / draft-zyp-json-schema-04.xml
1 <?xml version="1.0" encoding="US-ASCII"?>\r
2 <!DOCTYPE rfc SYSTEM "rfc2629.dtd" [\r
3 <!ENTITY rfc4627 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4627.xml">\r
4 <!ENTITY rfc3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">\r
5 <!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">\r
6 <!ENTITY rfc4287 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4287.xml">\r
7 <!ENTITY rfc2616 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml">\r
8 <!ENTITY rfc3339 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3339.xml">\r
9 <!ENTITY rfc2045 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2045.xml">\r
10 <!ENTITY rfc5226 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml">\r
11 <!ENTITY iddiscovery SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.hammer-discovery.xml">\r
12 <!ENTITY uritemplate SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.gregorio-uritemplate.xml">\r
13 <!ENTITY linkheader SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.nottingham-http-link-header.xml">\r
14 <!ENTITY html401 SYSTEM "http://xml.resource.org/public/rfc/bibxml4/reference.W3C.REC-html401-19991224.xml">\r
15 <!ENTITY css21 SYSTEM "http://xml.resource.org/public/rfc/bibxml4/reference.W3C.CR-CSS21-20070719.xml">\r
16 ]>\r
17 <?rfc toc="yes"?>\r
18 <?rfc symrefs="yes"?>\r
19 <?rfc compact="yes"?>\r
20 <?rfc subcompact="no"?>\r
21 <?rfc strict="no"?>\r
22 <?rfc rfcedstyle="yes"?>\r
23 <rfc category="info" docName="draft-zyp-json-schema-04" ipr="trust200902">\r
24         <front>\r
25                 <title abbrev="JSON Schema Media Type">A JSON Media Type for Describing the Structure and Meaning of JSON Documents</title>\r
26                 \r
27                 <author fullname="Kris Zyp" initials="K" role="editor" surname="Zyp">\r
28                         <organization>SitePen (USA)</organization>\r
29                         <address>\r
30                                 <postal>\r
31                                         <street>530 Lytton Avenue</street>\r
32                                         <city>Palo Alto, CA 94301</city>\r
33                                         <country>USA</country>\r
34                                 </postal>\r
35                                 <phone>+1 650 968 8787</phone>\r
36                                 <email>kris@sitepen.com</email>\r
37                         </address>\r
38                 </author>\r
39                 \r
40                 <author fullname="Gary Court" initials="G" surname="Court">\r
41                         <address>\r
42                                 <postal>\r
43                                         <street></street>\r
44                                         <city>Calgary, AB</city>\r
45                                         <country>Canada</country>\r
46                                 </postal>\r
47                                 <email>gary.court@gmail.com</email>\r
48                         </address>\r
49                 </author>\r
50                 \r
51                 <date year="2011" />\r
52                 <workgroup>Internet Engineering Task Force</workgroup>\r
53                 <keyword>JSON</keyword>\r
54                 <keyword>Schema</keyword>\r
55                 <keyword>JavaScript</keyword>\r
56                 <keyword>Object</keyword>\r
57                 <keyword>Notation</keyword>\r
58                 <keyword>Hyper Schema</keyword>\r
59                 <keyword>Hypermedia</keyword>\r
60                 \r
61                 <abstract>\r
62                         <t>\r
63                                 JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", \r
64                                 a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON \r
65                                 data is required for a given application and how to interact with it. JSON \r
66                                 Schema is intended to define validation, documentation, hyperlink \r
67                                 navigation, and interaction control of JSON data. \r
68                         </t>\r
69                 </abstract>\r
70         </front>\r
71         \r
72         <middle>\r
73                 <section title="Introduction">\r
74                         <t>\r
75                                 JSON (JavaScript Object Notation) Schema is a JSON media type for defining \r
76                                 the structure of JSON data. JSON Schema provides a contract for what JSON \r
77                                 data is required for a given application and how to interact with it. JSON \r
78                                 Schema is intended to define validation, documentation, hyperlink \r
79                                 navigation, and interaction control of JSON data. \r
80                         </t>\r
81                 </section>\r
82                 \r
83                 <section title="Conventions and Terminology">\r
84                         <t>\r
85                                 <!-- The text in this section has been copied from the official boilerplate, \r
86                                 and should not be modified.-->\r
87                                 \r
88                                 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", \r
89                                 "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be\r
90                                 interpreted as described in <xref target="RFC2119">RFC 2119</xref>.\r
91                         </t>\r
92                         \r
93                         <t>\r
94                                 The terms "JSON", "JSON text", "JSON value", "member", "element", "object", \r
95                                 "array", "number", "string", "boolean", "true", "false", and "null" in this \r
96                                 document are to be interpreted as defined in <xref target="RFC4627">RFC 4627</xref>.\r
97                         </t>\r
98                         \r
99                         <t>\r
100                                 This specification also uses the following defined terms:\r
101                         \r
102                                 <list style="hanging">\r
103                                         <t hangText="schema">A JSON Schema object.</t>\r
104                                         <t hangText="instance">Equivalent to "JSON value" as defined in <xref target="RFC4627">RFC 4627</xref>.</t>\r
105                                         <t hangText="property">Equivalent to "member" as defined in <xref target="RFC4627">RFC 4627</xref>.</t>\r
106                                         <t hangText="item">Equivalent to "element" as defined in <xref target="RFC4627">RFC 4627</xref>.</t>\r
107                                         <t hangText="attribute">A property of a JSON Schema object.</t>\r
108                                 </list>\r
109                         </t>\r
110                 </section>\r
111                 \r
112                 <section title="Overview">\r
113                         <t>\r
114                                 JSON Schema defines the media type "application/schema+json" for \r
115                                 describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities \r
116                                 for describing the structure of JSON in terms of\r
117                                 allowable values, descriptions, and interpreting relations with other resources.\r
118                         </t>\r
119                         <t>\r
120                                 This document is organized into several separate definitions. The first \r
121                                 definition is the core schema specification. This definition is primary \r
122                                 concerned with describing a JSON structure and specifying valid elements\r
123                                 in the structure. The second definition is the Hyper Schema specification\r
124                                 which is intended to define elements in a structure that can be interpreted as\r
125                                 hyperlinks.\r
126                                 Hyper Schema builds on JSON Schema to describe the hyperlink structure of \r
127                                 JSON values. This allows user agents to be able to successfully navigate\r
128                                 documents containing JSON based on their schemas.\r
129                         </t>\r
130                         <t>\r
131                                 Cumulatively JSON Schema acts as meta-JSON that can be used to define the \r
132                                 required type and constraints on JSON values, as well as define the meaning\r
133                                 of the JSON values for the purpose of describing a resource and determining\r
134                                 hyperlinks within the representation. \r
135                         </t>\r
136                         <figure>\r
137                                 <preamble>An example JSON Schema that describes products might look like:</preamble>\r
138                                 <artwork>\r
139 <![CDATA[       \r
140 {\r
141         "title": "Product",\r
142         "properties": {\r
143                 "id": {\r
144                         "title": "Product Identifier",\r
145                         "type": "number"\r
146                 },\r
147                 "name": {\r
148                         "title": "Product Name",\r
149                         "type": "string"\r
150                 },\r
151                 "price": {\r
152                         "type": "number",\r
153                         "minimum": 0\r
154                 },\r
155                 "tags": {\r
156                         "type": "array",\r
157                         "items": {\r
158                                 "type": "string"\r
159                         }\r
160                 }\r
161         },\r
162         "required" : ["id", "name", "price"],\r
163         "links": [{\r
164                 "rel": "full",\r
165                 "href": "{id}"\r
166         }, {\r
167                 "rel": "comments",\r
168                 "href": "comments/?id={id}"\r
169         }]\r
170 }\r
171 ]]>\r
172                                 </artwork>\r
173                                 <postamble>\r
174                                         This schema defines the properties of the instance, \r
175                                         the required properties (id, name, and price), as well as an optional\r
176                                         property (tags). This also defines the link relations of the instance.\r
177                                 </postamble>\r
178                         </figure>\r
179                         \r
180                         <section title="Design Considerations">\r
181                                 <t>\r
182                                         The JSON Schema media type does not attempt to dictate the structure of JSON\r
183                                         values that contain data, but rather provides a separate format\r
184                                         for flexibly communicating how a JSON value should be\r
185                                         interpreted and validated, such that user agents can properly understand\r
186                                         acceptable structures and extrapolate hyperlink information\r
187                                         from the JSON. It is acknowledged that JSON values come\r
188                                         in a variety of structures, and JSON is unique in that the structure\r
189                                         of stored data structures often prescribes a non-ambiguous definite\r
190                                         JSON representation. Attempting to force a specific structure is generally\r
191                                         not viable, and therefore JSON Schema allows for a great flexibility\r
192                                         in the structure of the JSON data that it describes.\r
193                                 </t>\r
194                                 <t>\r
195                                         This specification is protocol agnostic.\r
196                                         The underlying protocol (such as HTTP) should sufficiently define the\r
197                                         semantics of the client-server interface, the retrieval of resource\r
198                                         representations linked to by JSON representations, and modification of \r
199                                         those resources. The goal of this\r
200                                         format is to sufficiently describe JSON structures such that one can\r
201                                         utilize existing information available in existing JSON\r
202                                         representations from a large variety of services that leverage a representational state transfer\r
203                                         architecture using existing protocols.\r
204                                 </t>\r
205                         </section>\r
206                 </section>\r
207                 \r
208                 <section title="Schema/Instance Association">\r
209                         <t>\r
210                                 JSON values are correlated to their schema by the "describedby"\r
211                                 relation, where the schema is the target of the relation.\r
212                                 JSON values MUST be of the "application/json" media type or\r
213                                 any other subtype. Consequently, dictating how a JSON value should \r
214                                 specify the relation to the schema is beyond the normative scope\r
215                                 of this document since this document specifically defines the JSON\r
216                                 Schema media type, and no other. It is RECOMMNENDED that JSON values\r
217                                 specify their schema so that user agents can interpret the instance\r
218                                 and retain the self-descriptive characteristics. This avoides the need for out-of-band information about\r
219                                 instance data. Two approaches are recommended for declaring the\r
220                                 relation to the schema that describes the meaning of a JSON instance's (or collection \r
221                                 of instances) structure. A MIME type parameter named\r
222                                 "profile" or a relation of "describedby" (which could be specified by a Link header) may be used:\r
223                                 \r
224                                 <figure>\r
225                                         <artwork>\r
226 <![CDATA[       \r
227 Content-Type: application/my-media-type+json;\r
228               profile=http://example.com/my-hyper-schema\r
229 ]]>\r
230                                         </artwork>\r
231                                 </figure>\r
232                                 \r
233                                 or if the content is being transferred by a protocol (such as HTTP) that\r
234                                 provides headers, a Link header can be used:\r
235                                 \r
236                                 <figure>\r
237                                         <artwork>\r
238 <![CDATA[\r
239 Link: <http://example.com/my-hyper-schema>; rel="describedby"\r
240 ]]>\r
241                                         </artwork>\r
242                                 </figure>\r
243                                 \r
244                                 Instances MAY specify multiple schemas, to indicate all the schemas that \r
245                                 are applicable to the data, and the data SHOULD be valid by all the schemas. \r
246                                 The instance data MAY have multiple schemas \r
247                                 that it is described by (the instance data SHOULD be valid for those schemas). \r
248                                 Or if the document is a collection of instances, the collection MAY contain \r
249                                 instances from different schemas. The mechanism for referencing a schema is \r
250                                 determined by the media type of the instance (if it provides a method for \r
251                                 referencing schemas).\r
252                         </t>\r
253                         \r
254                         <section title="Self-Descriptive Schema">\r
255                                 <t>\r
256                                         JSON Schemas can themselves be described using JSON Schemas. \r
257                                         A self-describing JSON Schema for the core JSON Schema can\r
258                                         be found at <eref target="http://json-schema.org/schema">http://json-schema.org/schema</eref> for the latest version or \r
259                                         <eref target="http://json-schema.org/draft-04/schema">http://json-schema.org/draft-04/schema</eref> for the draft-04 version. The hyper schema \r
260                                         self-description can be found at <eref target="http://json-schema.org/hyper-schema">http://json-schema.org/hyper-schema</eref> \r
261                                         or <eref target="http://json-schema.org/draft-04/hyper-schema">http://json-schema.org/draft-04/hyper-schema</eref>. All schemas\r
262                                         used within a protocol with a media type specified SHOULD include a MIME parameter that refers to the self-descriptive\r
263                                         hyper schema or another schema that extends this hyper schema:\r
264                                         \r
265                                         <figure>\r
266                                                 <artwork>\r
267 <![CDATA[       \r
268 Content-Type: application/json; \r
269               profile=http://json-schema.org/draft-04/hyper-schema\r
270 ]]>\r
271                                                 </artwork>\r
272                                         </figure>\r
273                                 </t>\r
274                         </section>\r
275                 </section>\r
276                 \r
277                 <section title="Core Schema Definition">\r
278                         <t>\r
279                                 A JSON Schema is a JSON object that defines various attributes \r
280                                 (including usage and valid values) of a JSON value. JSON\r
281                                 Schema has recursive capabilities; there are a number of elements\r
282                                 in the structure that allow for nested JSON Schemas.\r
283                         </t>\r
284                         \r
285                         <figure>\r
286                                 <preamble>An example JSON Schema could look like:</preamble>\r
287                                 <artwork>\r
288 <![CDATA[\r
289 {\r
290         "description": "A person",\r
291         "type": "object",\r
292 \r
293         "properties": {\r
294                 "name": {\r
295                         "type": "string"\r
296                 },\r
297                 "age": {\r
298                         "type": "number",\r
299                         "divisibleBy": 1,\r
300                         "minimum": 0,\r
301                         "maximum": 125\r
302                 }\r
303         }\r
304 }\r
305 ]]>\r
306                                 </artwork>\r
307                         </figure>\r
308                         \r
309                         <t>\r
310                                 A JSON Schema object MAY have any of the following optional properties:\r
311                         </t>\r
312                         \r
313                         <!-- TODO: Break attributes up into type sections -->\r
314                         <!-- TODO: Add examples for (almost) every attribute -->\r
315                         \r
316                         <section title="type" anchor="type">\r
317                                 <t>\r
318                                         This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. \r
319                                         This attribute can take one of two forms:\r
320 \r
321                                         <list style="hanging">\r
322                                                 <t hangText="Simple Types">\r
323                                                         A string indicating a primitive or simple type. The string MUST be one of the following values:\r
324 \r
325                                                         <list style="hanging">\r
326                                                                 <t hangText="object">Instance MUST be an object.</t>\r
327                                                                 <t hangText="array">Instance MUST be an array.</t>\r
328                                                                 <t hangText="string">Instance MUST be a string.</t>\r
329                                                                 <t hangText="number">Instance MUST be a number, including floating point numbers.</t>\r
330                                                                 <t hangText="boolean">Instance MUST be the JSON literal "true" or "false".</t>\r
331                                                                 <t hangText="null">Instance MUST be the JSON literal "null". Note that without this type, null values are not allowed.</t>\r
332                                                                 <t hangText="any">Instance MAY be of any type, including null.</t>\r
333                                                         </list>\r
334                                                 </t>\r
335                                                 \r
336                                                 <t hangText="Union Types">\r
337                                                         An array of one or more simple or schema types.\r
338                                                         The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array. \r
339                                                 </t>\r
340                                         </list>\r
341                                         \r
342                                         If this attribute is not specified, then all value types are accepted. \r
343                                 </t>\r
344                                 \r
345                                 <figure>\r
346                                         <preamble>For example, a schema that defines if an instance can be a string or a number would be:</preamble>\r
347                                         <artwork>\r
348 <![CDATA[\r
349 {\r
350         "type": ["string", "number"]\r
351 }\r
352 ]]></artwork>\r
353                                 </figure>\r
354                         </section>\r
355                         \r
356                         <section title="properties" anchor="properties">\r
357                                 <t>\r
358                                         This attribute is an object with properties that specify the schemas for the properties of the instance object.\r
359                                         In this attribute's object, each property value MUST be a schema. \r
360                                         When the instance value is an object, the value of the instance's properties MUST be valid according to the schemas with the same property names specified in this attribute.\r
361                                         Objects are unordered, so therefore the order of the instance properties or attribute properties MUST NOT determine validation success.\r
362                                 </t>\r
363                         </section>\r
364                         \r
365                         <section title="patternProperties" anchor="patternProperties">\r
366                                 <t>\r
367                                         This attribute is an object that defines the schema for a set of property names of an object instance. \r
368                                         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. \r
369                                         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.\r
370                                 </t>\r
371                         </section>\r
372                         \r
373                         <section title="additionalProperties" anchor="additionalProperties">\r
374                                 <t>This attribute specifies how any instance property that is not explicitly defined by either the <xref target="properties">"properties"</xref> or <xref target="patternProperties">"patternProperties"</xref> attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean.</t> \r
375                                 <t>If a schema is provided, then all additional properties MUST be valid according to the schema.</t>\r
376                                 <t>If false is provided, then no additional properties are allowed.</t>\r
377                                 <t>The default value is an empty schema, which allows any value for additional properties.</t>\r
378                         </section>\r
379                         \r
380                         <section title="items" anchor="items">\r
381                                 <t>This attribute provides the allowed items in an array instance. If specified, this attribute MUST be a schema or an array of schemas.</t>\r
382                                 <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>\r
383                                 <t>When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST be valid according 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 the same way as <xref target="additionalProperties">"additionalProperties"</xref> for objects is.</t>\r
384                         </section>\r
385                         \r
386                         <section title="additionalItems" anchor="additionalItems">\r
387                                 <t>This attribute specifies how any item in the array instance that is not explicitly defined by <xref target="items">"items"</xref> (hereafter referred to as "additional items") is handled. If specified, the value MUST be a schema or a boolean.</t>\r
388                                 <t>If a schema is provided:\r
389                                         <list>\r
390                                                 <t>If the <xref target="items">"items"</xref> attribute is unspecified, then all items in the array instance must be valid against this schema.</t>\r
391                                                 <t>If the <xref target="items">"items"</xref> attribute is a schema, then this attribute is ignored.</t>\r
392                                                 <t>If the <xref target="items">"items"</xref> attribute is an array (during tuple typing), then any additional items MUST be valid against this schema.</t>\r
393                                         </list>\r
394                                 </t>\r
395                                 <t>If false is provided, then any additional items in the array are not allowed.</t>\r
396                                 <t>The default value is an empty schema, which allows any value for additional items.</t>\r
397                         </section>\r
398                         \r
399                         <section title="required" anchor="required">\r
400                                 <t>This attribute is an array of strings that defines all the property names that must exist on the object instance.</t>\r
401                         </section>\r
402                         \r
403                         <section title="dependencies" anchor="dependencies">\r
404                                 <t>This attribute is an object that specifies the requirements of a property on an object instance. 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>\r
405                                 <t>\r
406                                         The dependency value can take one of two forms:\r
407                                         \r
408                                         <list style="hanging">\r
409                                                 <t hangText="Simple Dependency">\r
410                                                         If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value.\r
411                                                         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.\r
412                                                 </t>\r
413                                                 <t hangText="Schema Dependency">\r
414                                                         If the dependency value is a schema, then the instance object MUST be valid against the schema.\r
415                                                 </t>\r
416                                         </list>\r
417                                 </t>\r
418                         </section>\r
419                         \r
420                         <section title="minimum" anchor="minimum">\r
421                                 <t>This attribute defines the minimum value of the instance property when the type of the instance value is a number.</t>\r
422                         </section>\r
423                         \r
424                         <section title="maximum" anchor="maximum">\r
425                                 <t>This attribute defines the maximum value of the instance property when the type of the instance value is a number.</t>\r
426                         </section>\r
427                         \r
428                         <section title="exclusiveMinimum" anchor="exclusiveMinimum">\r
429                                 <t>This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value.</t>\r
430                         </section>\r
431                         \r
432                         <section title="exclusiveMaximum" anchor="exclusiveMaximum">\r
433                                 <t>This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value.</t>\r
434                         </section>\r
435                         \r
436                         <section title="minItems" anchor="minItems">\r
437                                 <t>This attribute defines the minimum number of values in an array when the array is the instance value.</t>\r
438                         </section>\r
439                         \r
440                         <section title="maxItems" anchor="maxItems">\r
441                                 <t>This attribute defines the maximum number of values in an array when the array is the instance value.</t>\r
442                         </section>\r
443                         \r
444                         <section title="minProperties" anchor="minProperties">\r
445                                 <t>This attribute defines the minimum number of properties required on an object instance.</t>\r
446                         </section>\r
447                         \r
448                         <section title="maxProperties" anchor="maxProperties">\r
449                                 <t>This attribute defines the maximum number of properties the object instance can have.</t>\r
450                         </section>\r
451                         \r
452                         <section title="uniqueItems" anchor="uniqueItems">\r
453                                 <t>This attribute indicates that all items in an array instance MUST be unique (contains no two identical values).</t>\r
454                                 <t>\r
455                                         Two instance are consider equal if they are both of the same type and:\r
456                                         \r
457                                         <list>\r
458                                                 <t>are null; or</t>\r
459                                                 <t>are booleans/numbers/strings and have the same value; or</t>\r
460                                                 <t>are arrays, contains the same number of items, and each item in the array is equal to the item at the corresponding index in the other array; or</t>\r
461                                                 <t>are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object.</t>\r
462                                         </list>\r
463                                 </t>\r
464                         </section>\r
465                         \r
466                         <section title="pattern" anchor="pattern">\r
467                                 <t>When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5</t>\r
468                         </section>\r
469                         \r
470                         <section title="minLength" anchor="minLength">\r
471                                 <t>When the instance value is a string, this defines the minimum length of the string.</t>\r
472                         </section>\r
473                         \r
474                         <section title="maxLength" anchor="maxLength">\r
475                                 <t>When the instance value is a string, this defines the maximum length of the string.</t>\r
476                         </section>\r
477                         \r
478                         <section title="enum" anchor="enum">\r
479                                 <t>This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in <xref target="uniqueItems">"uniqueItems"</xref>.</t>\r
480                         </section>\r
481                         \r
482                         <section title="default" anchor="default">\r
483                                 <t>This attribute defines the default value of the instance when the instance is undefined.</t>\r
484                         </section>\r
485                         \r
486                         <section title="title" anchor="title">\r
487                                 <t>This attribute is a string that provides a short description of the instance property.</t>\r
488                         </section>\r
489                         \r
490                         <section title="description" anchor="description">\r
491                                 <t>This attribute is a string that provides a full description of the of purpose the instance property.</t>\r
492                         </section>\r
493                         \r
494                         <section title="divisibleBy" anchor="divisibleBy">\r
495                                 <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.) The value of this attribute SHOULD NOT be 0.</t>\r
496                         </section>\r
497                         \r
498                         <section title="disallow" anchor="disallow">\r
499                                 <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>\r
500                         </section>\r
501                         \r
502                         <section title="extends" anchor="extends">\r
503                                 <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>\r
504                                 <t>\r
505                                         Conceptually, the behavior of extends can be seen as validating an\r
506                                         instance against all constraints in the extending schema as well as\r
507                                         the extended schema(s). More optimized implementations that merge\r
508                                         schemas are possible, but are not required. Some examples of using "extends":\r
509                                         \r
510                                         <figure>\r
511                                                 <artwork>\r
512 <![CDATA[\r
513 {\r
514         "description": "An adult",\r
515         "properties": {\r
516                 "age": {\r
517                         "minimum": 21\r
518                 }\r
519         },\r
520         "extends": {"$ref": "person"}\r
521 }\r
522 ]]>\r
523                                                 </artwork>\r
524                                         </figure>\r
525                                         \r
526                                         <figure>\r
527                                                 <artwork>\r
528 <![CDATA[\r
529 {\r
530         "description": "Extended schema",\r
531         "properties": {\r
532                 "deprecated": {\r
533                         "type": "boolean"\r
534                 }\r
535         },\r
536         "extends": {"$ref": "http://json-schema.org/draft-04/schema"}\r
537 }\r
538 ]]>\r
539                                                 </artwork>\r
540                                         </figure>\r
541                                 </t>\r
542                         </section>\r
543                         \r
544                         <section title="id" anchor="id">\r
545                                 <t>\r
546                                         This attribute defines the current URI of this schema (this attribute is\r
547                                         effectively a "self" link). This URI MAY be relative or absolute. If\r
548                                         the URI is relative it is resolved against the current URI of the parent\r
549                                         schema it is contained in. If this schema is not contained in any\r
550                                         parent schema, the current URI of the parent schema is held to be the\r
551                                         URI under which this schema was addressed. If id is missing, the current URI of a schema is\r
552                                         defined to be that of the parent schema. The current URI of the schema\r
553                                         is also used to construct relative references such as for $ref.\r
554                                 </t>\r
555                         </section>\r
556                         \r
557                         <section title="$ref" anchor="ref">\r
558                                 <t>\r
559                                         This attribute defines a URI of a schema that contains the full representation of this schema. \r
560                                         When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. \r
561                                         This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema.\r
562                                 </t>\r
563                         </section>\r
564                         \r
565                         <section title="$schema" anchor="schema">\r
566                                 <t>\r
567                                         This attribute defines a URI of a JSON Schema that is the schema of the current schema. \r
568                                         When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving <xref target="hyper-schema">Hyper Schema</xref><xref target="links">links</xref>.\r
569                                 </t>\r
570                                 \r
571                                 <t>\r
572                                         A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. \r
573                                         Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes.\r
574                                 </t>\r
575                         </section>\r
576                 </section>\r
577                 \r
578                 <section title="Hyper Schema" anchor="hyper-schema">\r
579                         <t>\r
580                                 The following attributes are specified in addition to those\r
581                                 attributes that already provided by the core schema with the specific\r
582                                 purpose of informing user agents of relations between resources based\r
583                                 on JSON data. Just as with JSON\r
584                                 schema attributes, all the attributes in hyper schemas are optional.\r
585                                 Therefore, an empty object is a valid (non-informative) schema, and\r
586                                 essentially describes plain JSON (no constraints on the structures).\r
587                                 Addition of attributes provides additive information for user agents.\r
588                         </t>\r
589                         \r
590                         <section title="links" anchor="links">\r
591                                 <t>\r
592                                         The value of the links property MUST be an array, where each item \r
593                                         in the array is a link description object which describes the link\r
594                                         relations of the instances.\r
595                                 </t>\r
596                                 \r
597                                 <!-- TODO: Needs more clarification and examples -->\r
598                                 \r
599                                 <section title="Link Description Object">\r
600                                         <t>\r
601                                                 A link description object is used to describe link relations. In \r
602                                                 the context of a schema, it defines the link relations of the \r
603                                                 instances of the schema, and can be parameterized by the instance\r
604                                                 values. The link description format can be used without JSON Schema, \r
605                                                 and use of this format can\r
606                                                 be declared by referencing the normative link description\r
607                                                 schema as the the schema for the data structure that uses the \r
608                                                 links. The URI of the normative link description schema is: \r
609                                                 <eref target="http://json-schema.org/links">http://json-schema.org/links</eref> (latest version) or\r
610                                                 <eref target="http://json-schema.org/draft-04/links">http://json-schema.org/draft-04/links</eref> (draft-04 version).\r
611                                         </t>\r
612                                         \r
613                                         <section title="href" anchor="href">\r
614                                                 <t>\r
615                                                         The value of the "href" link description property\r
616                                                         indicates the target URI of the related resource. The value\r
617                                                         of the instance property SHOULD be resolved as a URI-Reference per <xref target="RFC3986">RFC 3986</xref>\r
618                                                         and MAY be a relative URI. The base URI to be used for relative resolution\r
619                                                         SHOULD be the URI used to retrieve the instance object (not the schema)\r
620                                                         when used within a schema. Also, when links are used within a schema, the URI \r
621                                                         SHOULD be parametrized by the property values of the instance \r
622                                                         object, if property values exist for the corresponding variables\r
623                                                         in the template (otherwise they MAY be provided from alternate sources, like user input).\r
624                                                 </t>\r
625                                                 \r
626                                                 <t>\r
627                                                         Instance property values SHOULD be substituted into the URIs where\r
628                                                         matching braces ('{', '}') are found surrounding zero or more characters,\r
629                                                         creating an expanded URI. Instance property value substitutions are resolved\r
630                                                         by using the text between the braces to denote the property name\r
631                                                         from the instance to get the value to substitute. \r
632                                                         \r
633                                                         <figure>\r
634                                                                 <preamble>For example, if an href value is defined:</preamble>\r
635                                                                 <artwork>\r
636 <![CDATA[\r
637 http://somesite.com/{id}\r
638 ]]>\r
639                                                                 </artwork>\r
640                                                                 <postamble>Then it would be resolved by replace the value of the "id" property value from the instance object.</postamble>\r
641                                                         </figure>\r
642                                                         \r
643                                                         <figure>\r
644                                                                 <preamble>If the value of the "id" property was "45", the expanded URI would be:</preamble>\r
645                                                                 <artwork>\r
646 <![CDATA[\r
647 http://somesite.com/45\r
648 ]]>\r
649                                                                 </artwork>\r
650                                                         </figure>\r
651                                                         \r
652                                                         If matching braces are found with the string "@" (no quotes) between the braces, then the \r
653                                                         actual instance value SHOULD be used to replace the braces, rather than a property value.\r
654                                                         This should only be used in situations where the instance is a scalar (string, \r
655                                                         boolean, or number), and not for objects or arrays.\r
656                                                 </t>\r
657                                         </section>\r
658                                         \r
659                                         <section title="rel">\r
660                                                 <t>\r
661                                                         The value of the "rel" property indicates the name of the \r
662                                                         relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation.\r
663                                                 </t>\r
664                                                 \r
665                                                 <t>\r
666                                                         Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see <xref target="RFC4287">RFC 4287</xref>). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations:\r
667                                                         \r
668                                                         <list style="hanging">\r
669                                                                 <t hangText="self">\r
670                                                                         If the relation value is "self", when this property is encountered in\r
671                                                                         the instance object, the object represents a resource and the instance object is\r
672                                                                         treated as a full representation of the target resource identified by\r
673                                                                         the specified URI.\r
674                                                                 </t>\r
675                                                                 \r
676                                                                 <t hangText="full">\r
677                                                                         This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation.\r
678                                                                 </t>\r
679                                                                 \r
680                                                                 <t hangText="describedby">\r
681                                                                         This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures.\r
682                                                                 </t>\r
683                                                                 \r
684                                                                 <t hangText="root">\r
685                                                                         This relation indicates that the target of the link\r
686                                                                         SHOULD be treated as the root or the body of the representation for the\r
687                                                                         purposes of user agent interaction or fragment resolution. All other\r
688                                                                         properties of the instance objects can be regarded as meta-data\r
689                                                                         descriptions for the data.\r
690                                                                 </t>\r
691                                                         </list>\r
692                                                 </t>\r
693                                                 \r
694                                                 <t>\r
695                                                         The following relations are applicable for schemas (the schema as the "from" resource in the relation):\r
696 \r
697                                                         <list style="hanging">\r
698                                                                 <t hangText="instances">This indicates the target resource that represents collection of instances of a schema.</t>\r
699                                                                 <t hangText="create">This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST).</t>\r
700                                                         </list>\r
701                                                 </t>\r
702                                                 \r
703                                                 <t>\r
704                                                         <figure>\r
705                                                                 <preamble>For example, if a schema is defined:</preamble>\r
706                                                                 <artwork>\r
707 <![CDATA[\r
708 {\r
709         "links": [{\r
710                 "rel": "self",\r
711                 "href": "{id}"\r
712         }, {\r
713                 "rel": "up",\r
714                 "href": "{upId}"\r
715         }, {\r
716                 "rel": "children",\r
717                 "href": "?upId={id}"\r
718         }]\r
719 }\r
720 ]]>\r
721                                                                 </artwork>\r
722                                                         </figure>\r
723                                                         \r
724                                                         <figure>\r
725                                                                 <preamble>And if a collection of instance resource's JSON representation was retrieved:</preamble>\r
726                                                                 <artwork>\r
727 <![CDATA[\r
728 GET /Resource/\r
729 \r
730 [{\r
731         "id": "thing",\r
732         "upId": "parent"\r
733 }, {\r
734         "id": "thing2",\r
735         "upId": "parent"\r
736 }]\r
737 ]]>\r
738                                                                 </artwork>\r
739                                                         </figure>\r
740 \r
741                                                         This would indicate that for the first item in the collection, its own\r
742                                                         (self) URI would resolve to "/Resource/thing" and the first item's "up"\r
743                                                         relation SHOULD be resolved to the resource at "/Resource/parent".\r
744                                                         The "children" collection would be located at "/Resource/?upId=thing".\r
745                                                 </t>\r
746                                         </section>\r
747                                         \r
748                                         <section title="template">\r
749                                                 <t>This property value is a string that defines the templating language used in the <xref target="href">"href"</xref> attribute. If no templating language is defined, then the default <xref target="href">Link Description Object templating langauge</xref> is used.</t>\r
750                                         </section>\r
751                                         \r
752                                         <section title="targetSchema">\r
753                                                 <t>This property value is a schema that defines the expected structure of the JSON representation of the target of the link.</t>\r
754                                         </section>\r
755                                         \r
756                                         <section title="Submission Link Properties">\r
757                                                 <t>\r
758                                                         The following properties also apply to link definition objects, and \r
759                                                         provide functionality analogous to HTML forms, in providing a \r
760                                                         means for submitting extra (often user supplied) information to send to a server.\r
761                                                 </t>\r
762                                                 \r
763                                                 <section title="method">\r
764                                                         <t>\r
765                                                                 This attribute defines which method can be used to access the target resource. \r
766                                                                 In an HTTP environment, this would be "GET" or "POST" (other HTTP methods \r
767                                                                 such as "PUT" and "DELETE" have semantics that are clearly implied by \r
768                                                                 accessed resources, and do not need to be defined here). \r
769                                                                 This defaults to "GET".\r
770                                                         </t>\r
771                                                 </section>\r
772                                                 \r
773                                                 <section title="enctype">\r
774                                                         <t>\r
775                                                                 If present, this property indicates a query media type format that the server\r
776                                                                 supports for querying or posting to the collection of instances at the target \r
777                                                                 resource. The query can be \r
778                                                                 suffixed to the target URI to query the collection with\r
779                                                                 property-based constraints on the resources that SHOULD be returned from\r
780                                                                 the server or used to post data to the resource (depending on the method).\r
781                                                                 \r
782                                                                 <figure>\r
783                                                                         <preamble>For example, with the following schema:</preamble>\r
784                                                                         <artwork>\r
785 <![CDATA[\r
786 {\r
787         "links": [{\r
788                 "enctype": "application/x-www-form-urlencoded",\r
789                 "method": "GET",\r
790                 "href": "/Product/",\r
791                 "properties": {\r
792                         "name": {\r
793                                 "description": "name of the product"\r
794                         }\r
795                 }\r
796         }]\r
797 }\r
798 ]]>\r
799                                                                         </artwork>\r
800                                                                         <postamble>This indicates that the client can query the server for instances that have a specific name.</postamble>\r
801                                                                 </figure>\r
802                                                                 \r
803                                                                 <figure>\r
804                                                                         <preamble>For example:</preamble>\r
805                                                                         <artwork>\r
806 <![CDATA[\r
807 /Product/?name=Slinky\r
808 ]]>\r
809                                                                         </artwork>\r
810                                                                 </figure>\r
811 \r
812                                                                 If no enctype or method is specified, only the single URI specified by \r
813                                                                 the href property is defined. If the method is POST, "application/json" is \r
814                                                                 the default media type.\r
815                                                         </t>\r
816                                                 </section>\r
817                                                 \r
818                                                 <section title="schema">\r
819                                                         <t>\r
820                                                                 This attribute contains a schema which defines the acceptable structure of the submitted\r
821                                                                 request (for a GET request, this schema would define the properties for the query string \r
822                                                                 and for a POST request, this would define the body).\r
823                                                         </t>\r
824                                                 </section>\r
825                                         </section>\r
826                                 </section>\r
827                         </section>\r
828                         \r
829                         <section title="fragmentResolution">\r
830                                 <t>\r
831                                         This property indicates the fragment resolution protocol to use for\r
832                                         resolving fragment identifiers in URIs within the instance\r
833                                         representations. This applies to the instance object URIs and all\r
834                                         children of the instance object's URIs. The default fragment resolution\r
835                                         protocol is "json-pointer", which is defined below. Other fragment\r
836                                         resolution protocols MAY be used, but are not defined in this document.\r
837                                 </t>\r
838                                 \r
839                                 <t>\r
840                                         The fragment identifier is based on <xref target="RFC3986">RFC 3986, Sec 5</xref>, and defines the\r
841                                         mechanism for resolving references to entities within a document.\r
842                                 </t>\r
843                                 \r
844                                 <section title="json-pointer fragment resolution">\r
845                                         <t>The "json-pointer" fragment resolution protocol uses a <xref target="json-pointer">JSON Pointer</xref> to resolve fragment identifiers in URIs within instance representations.</t>\r
846                                 </section>\r
847                         </section>\r
848                         \r
849                         <!-- TODO: Remove this? -->\r
850                         \r
851                         <section title="readonly">\r
852                                 <t>This attribute indicates that the instance value SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server.</t>\r
853                         </section>\r
854                         \r
855                         <section title="contentEncoding">\r
856                                 <t>If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. <xref target="RFC2045">RFC 2045, Sec 6.1</xref> lists the possible values for this property.</t>\r
857                         </section>\r
858                         \r
859                         <section title="pathStart">\r
860                                 <t>\r
861                                         This attribute is a URI that defines what the instance's URI MUST start with in order to validate. \r
862                                         The value of the "pathStart" attribute MUST be resolved as per <xref target="RFC3986">RFC 3986, Sec 5</xref>, \r
863                                         and is relative to the instance's URI.\r
864                                 </t>\r
865                                 \r
866                                 <t>\r
867                                         When multiple schemas have been referenced for an instance, the user agent \r
868                                         can determine if this schema is applicable for a particular instance by \r
869                                         determining if the URI of the instance begins with the the value of the "pathStart"\r
870                                         attribute. If the URI of the instance does not start with this URI, \r
871                                         or if another schema specifies a starting URI that is longer and also matches the \r
872                                         instance, this schema SHOULD NOT be applied to the instance. Any schema \r
873                                         that does not have a pathStart attribute SHOULD be considered applicable \r
874                                         to all the instances for which it is referenced.\r
875                                 </t>\r
876                         </section>\r
877                         \r
878                         <section title="mediaType">\r
879                                 <t>This attribute defines the media type of the instance representations that this schema is defining.</t>\r
880                         </section>\r
881                 </section>\r
882                 \r
883                 <section title="Security Considerations">\r
884                         <t>\r
885                                 This specification is a sub-type of the JSON format, and \r
886                                 consequently the security considerations are generally the same as <xref target="RFC4627">RFC 4627</xref>. \r
887                                 However, an additional issue is that when link relation of "self"\r
888                                 is used to denote a full representation of an object, the user agent \r
889                                 SHOULD NOT consider the representation to be the authoritative representation\r
890                                 of the resource denoted by the target URI if the target URI is not\r
891                                 equivalent to or a sub-path of the the URI used to request the resource \r
892                                 representation which contains the target URI with the "self" link.\r
893                                 \r
894                                 <figure>\r
895                                         <preamble>For example, if a hyper schema was defined:</preamble>\r
896                                         <artwork>\r
897 <![CDATA[\r
898 {\r
899         "links": [{\r
900                 "rel": "self",\r
901                 "href": "{id}"\r
902         }]\r
903 }\r
904 ]]>\r
905                                         </artwork>\r
906                                 </figure>\r
907                                 \r
908                                 <figure>\r
909                                         <preamble>And a resource was requested from somesite.com:</preamble>\r
910                                         <artwork>\r
911 <![CDATA[\r
912 GET /foo/\r
913 ]]>\r
914                                         </artwork>\r
915                                 </figure>\r
916 \r
917                                 <figure>\r
918                                         <preamble>With a response of:</preamble>\r
919                                         <artwork>\r
920 <![CDATA[\r
921 Content-Type: application/json; profile=/schema-for-this-data\r
922 \r
923 [{\r
924         "id": "bar",\r
925         "name": "This representation can be safely treated \\r
926                 as authoritative "\r
927 }, {\r
928         "id": "/baz",\r
929         "name": "This representation should not be treated as \\r
930                 authoritative the user agent should make request the resource\\r
931                 from '/baz' to ensure it has the authoritative representation"\r
932 }, {\r
933         "id": "http://othersite.com/something",\r
934         "name": "This representation\\r
935                 should also not be treated as authoritative and the target\\r
936                 resource representation should be retrieved for the\\r
937                 authoritative representation"\r
938 }]\r
939 ]]>\r
940                                         </artwork>\r
941                                 </figure>\r
942                         </t>\r
943                 </section>\r
944                 \r
945                 <section title="IANA Considerations">\r
946                         <t>The proposed MIME media type for JSON Schema is "application/schema+json".</t>\r
947                         <t>Type name: application</t>\r
948                         <t>Subtype name: schema+json</t>\r
949                         <t>Required parameters: profile</t>\r
950                         <t>\r
951                                 The value of the profile parameter SHOULD be a URI (relative or absolute) that \r
952                                 refers to the schema used to define the structure of this structure (the \r
953                                 meta-schema). Normally the value would be http://json-schema.org/draft-04/hyper-schema,\r
954                                 but it is allowable to use other schemas that extend the hyper schema's meta-\r
955                                 schema.\r
956                         </t>\r
957                         <t>Optional parameters: pretty</t>\r
958                         <t>The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read.</t>\r
959                         \r
960                         <section title="Registry of Link Relations">\r
961                                 <t>\r
962                                         This registry is maintained by IANA per <xref target="RFC4287">RFC 4287</xref> and this specification adds\r
963                                         four values: "full", "create", "instances", "root".  New\r
964                                         assignments are subject to IESG Approval, as outlined in <xref target="RFC5226">RFC 5226</xref>.\r
965                                         Requests should be made by email to IANA, which will then forward the\r
966                                         request to the IESG, requesting approval.\r
967                                 </t>\r
968                         </section>\r
969                 </section>\r
970         </middle>\r
971         \r
972         <back>\r
973                 <!-- References Section -->\r
974                 <references title="Normative References">\r
975                         &rfc2045;\r
976                         &rfc2119;\r
977                         &rfc3339;\r
978                         &rfc3986;\r
979                         &rfc4287;\r
980                         <reference anchor="json-pointer" target="http://tools.ietf.org/html/draft-pbryan-zyp-json-pointer-02">\r
981                                 <front>\r
982                                         <title>JSON Pointer</title>\r
983                                         <author initials="P." surname="Bryan">\r
984                                                 <organization>ForgeRock US, Inc.</organization>\r
985                                         </author>\r
986                                         <author initials="K." surname="Zyp">\r
987                                                 <organization>SitePen (USA)</organization>\r
988                                         </author>\r
989                                         <date year="2011" month="October" />\r
990                                 </front>\r
991                         </reference>\r
992                 </references>\r
993                 <references title="Informative References">\r
994                         &rfc2616;\r
995                         &rfc4627;\r
996                         &rfc5226;\r
997                         &iddiscovery;\r
998                         &uritemplate;\r
999                         &linkheader;\r
1000                         &html401;\r
1001                         &css21;\r
1002                 </references>\r
1003 \r
1004                 <section title="Change Log">\r
1005                         <t>\r
1006                                 <list style="hanging">\r
1007                                         <t hangText="draft-04">\r
1008                                                 <list style="symbols">\r
1009                                                         <t>Changed "required" attribute to an array of strings.</t>\r
1010                                                         <t>Removed "format" attribute.</t>\r
1011                                                         <t>Added "minProperties" and "maxProperties" attributes.</t>\r
1012                                                         <t>Replaced "slash-delimited" fragment resolution with "json-pointer".</t>\r
1013                                                         <t>Added "template" LDO attribute.</t>\r
1014                                                         <t>Removed irrelevant "Open Issues" section.</t>\r
1015                                                         <t>Merged Conventions and Terminology sections.</t>\r
1016                                                         <t>Defined terms used in specification.</t>\r
1017                                                         <t>Removed "integer" type in favor of {"type":"number", "divisibleBy":1}.</t>\r
1018                                                         <t>Restricted "type" to only the core JSON types.</t>\r
1019                                                         <t>Improved wording of many sections.</t>\r
1020                                                 </list>\r
1021                                         </t>\r
1022                                 \r
1023                                         <t hangText="draft-03">\r
1024                                                 <list style="symbols">\r
1025                                                         <t>Added example and verbiage to "extends" attribute.</t>\r
1026                                                         <t>Defined slash-delimited to use a leading slash.</t>\r
1027                                                         <t>Made "root" a relation instead of an attribute.</t>\r
1028                                                         <t>Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types).</t>\r
1029                                                         <t>Added more explanation of nullability.</t>\r
1030                                                         <t>Removed "alternate" attribute.</t>\r
1031                                                         <t>Upper cased many normative usages of must, may, and should.</t>\r
1032                                                         <t>Replaced the link submission "properties" attribute to "schema" attribute.</t>\r
1033                                                         <t>Replaced "optional" attribute with "required" attribute.</t>\r
1034                                                         <t>Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute.</t>\r
1035                                                         <t>Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute.</t>\r
1036                                                         <t>Replaced "requires" attribute with "dependencies" attribute.</t>\r
1037                                                         <t>Moved "contentEncoding" attribute to hyper schema.</t>\r
1038                                                         <t>Added "additionalItems" attribute.</t>\r
1039                                                         <t>Added "id" attribute.</t>\r
1040                                                         <t>Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template.</t>\r
1041                                                         <t>Added "patternProperties" attribute.</t>\r
1042                                                         <t>Schema URIs are now namespace versioned.</t>\r
1043                                                         <t>Added "$ref" and "$schema" attributes.</t>\r
1044                                                 </list>\r
1045                                         </t>\r
1046                                         \r
1047                                         <t hangText="draft-02">\r
1048                                                 <list style="symbols">\r
1049                                                         <t>Replaced "maxDecimal" attribute with "divisibleBy" attribute.</t>\r
1050                                                         <t>Added slash-delimited fragment resolution protocol and made it the default.</t>\r
1051                                                         <t>Added language about using links outside of schemas by referencing its normative URI.</t>\r
1052                                                         <t>Added "uniqueItems" attribute.</t>\r
1053                                                         <t>Added "targetSchema" attribute to link description object.</t>\r
1054                                                 </list>\r
1055                                         </t>\r
1056                                         \r
1057                                         <t hangText="draft-01">\r
1058                                                 <list style="symbols">\r
1059                                                         <t>Fixed category and updates from template.</t>\r
1060                                                 </list>\r
1061                                         </t>\r
1062                                         \r
1063                                         <t hangText="draft-00">\r
1064                                                 <list style="symbols">\r
1065                                                         <t>Initial draft.</t>\r
1066                                                 </list>\r
1067                                         </t>\r
1068                                 </list>\r
1069                         </t>\r
1070                 </section>\r
1071         </back>\r
1072 </rfc>\r