Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit 5f11044

Browse files
committed
Update WIP with security and typo fixes
1 parent cfa537b commit 5f11044

File tree

3 files changed

+64
-56
lines changed

3 files changed

+64
-56
lines changed

work-in-progress/WIP-jsonschema-core.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
66
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
77

8-
<title>FOR PRE-PUBLICATION REVIEW ONLY: JSON Schema: A Media Type for Describing JSON Documents</title>
8+
<title>JSON Schema: A Media Type for Describing JSON Documents</title>
99

1010
<style type="text/css" title="Xml2Rfc (sans serif)">
1111
/*<![CDATA[*/
@@ -419,12 +419,12 @@
419419
<link href="#rfc.authors" rel="Chapter"/>
420420

421421

422-
<meta name="generator" content="xml2rfc version 2.5.1 - http://tools.ietf.org/tools/xml2rfc" />
422+
<meta name="generator" content="xml2rfc version 2.5.2 - http://tools.ietf.org/tools/xml2rfc" />
423423
<link rel="schema.dct" href="http://purl.org/dc/terms/" />
424424

425425
<meta name="dct.creator" content="Wright, A., Ed. and H. Andrews, Ed." />
426-
<meta name="dct.identifier" content="urn:ietf:id:draft-TO-BE-DETERMINED-json-schema-NN" />
427-
<meta name="dct.issued" scheme="ISO8601" content="2017-10-20" />
426+
<meta name="dct.identifier" content="urn:ietf:id:draft-handrews-json-schema-00" />
427+
<meta name="dct.issued" scheme="ISO8601" content="2017-11-16" />
428428
<meta name="dct.abstract" content="JSON Schema defines the media type &quot;application/schema+json&quot;, a JSON-based format for describing the structure of JSON data. JSON Schema asserts what a JSON document must look like, ways to extract information from it, and how to interact with it. The &quot;application/schema-instance+json&quot; media type provides additional feature-rich integration with &quot;application/schema+json&quot; beyond what can be offered for &quot;application/json&quot; documents. " />
429429
<meta name="description" content="JSON Schema defines the media type &quot;application/schema+json&quot;, a JSON-based format for describing the structure of JSON data. JSON Schema asserts what a JSON document must look like, ways to extract information from it, and how to interact with it. The &quot;application/schema-instance+json&quot; media type provides additional feature-rich integration with &quot;application/schema+json&quot; beyond what can be offered for &quot;application/json&quot; documents. " />
430430

@@ -448,20 +448,20 @@
448448
<td class="right">H. Andrews, Ed.</td>
449449
</tr>
450450
<tr>
451-
<td class="left">Expires: April 23, 2018</td>
451+
<td class="left">Expires: May 20, 2018</td>
452452
<td class="right">Cloudflare, Inc.</td>
453453
</tr>
454454
<tr>
455455
<td class="left"></td>
456-
<td class="right">October 20, 2017</td>
456+
<td class="right">November 16, 2017</td>
457457
</tr>
458458

459459

460460
</tbody>
461461
</table>
462462

463-
<p class="title">FOR PRE-PUBLICATION REVIEW ONLY: JSON Schema: A Media Type for Describing JSON Documents<br />
464-
<span class="filename">draft-TO-BE-DETERMINED-json-schema-NN</span></p>
463+
<p class="title">JSON Schema: A Media Type for Describing JSON Documents<br />
464+
<span class="filename">draft-handrews-json-schema-00</span></p>
465465

466466
<h1 id="rfc.abstract">
467467
<a href="#rfc.abstract">Abstract</a>
@@ -479,7 +479,7 @@ <h1 id="rfc.status">
479479
<p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
480480
<p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.</p>
481481
<p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."</p>
482-
<p>This Internet-Draft will expire on April 23, 2018.</p>
482+
<p>This Internet-Draft will expire on May 20, 2018.</p>
483483
<h1 id="rfc.copyrightnotice">
484484
<a href="#rfc.copyrightnotice">Copyright Notice</a>
485485
</h1>
@@ -585,7 +585,7 @@ <h1 id="rfc.section.4.2.1"><a href="#rfc.section.4.2.1">4.2.1.</a> Instance Data
585585
<p id="rfc.section.4.2.1.p.5">Note that JSON Schema vocabularies are free to define their own extended type system. This should not be confused with the core data model types defined here. As an example, "integer" is a reasonable type for a vocabulary to define as a value for a keyword, but the data model makes no distinction between integers and other numbers. </p>
586586
<h1 id="rfc.section.4.2.2"><a href="#rfc.section.4.2.2">4.2.2.</a> Instance Media Types</h1>
587587
<p id="rfc.section.4.2.2.p.1">JSON Schema is designed to fully work with "application/json" documents, as well as media types using the "+json" structured syntax suffix. </p>
588-
<p id="rfc.section.4.2.2.p.2">Some functionality that is useful for working with schemas is defined by each media type, namely media type parameters and URI fragment identifier syntax and semantics. These features are useful in content negotiation and in caclulating URIs for specific locations within an instance, respectively. </p>
588+
<p id="rfc.section.4.2.2.p.2">Some functionality that is useful for working with schemas is defined by each media type, namely media type parameters and URI fragment identifier syntax and semantics. These features are useful in content negotiation and in calculating URIs for specific locations within an instance, respectively. </p>
589589
<p id="rfc.section.4.2.2.p.3">This specification defines the "application/schema-instance+json" media type in order to allow instance authors to take full advantage of parameters and fragment identifiers for these purposes. </p>
590590
<h1 id="rfc.section.4.2.3"><a href="#rfc.section.4.2.3">4.2.3.</a> Instance Equality</h1>
591591
<p id="rfc.section.4.2.3.p.1">Two JSON instances are said to be equal if and only if they are of the same type and have the same value according to the data model. Specifically, this means: </p>
@@ -667,7 +667,7 @@ <h1 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3.</a> <a href="#integers"
667667
<h1 id="rfc.section.6.4"><a href="#rfc.section.6.4">6.4.</a> Extending JSON Schema</h1>
668668
<p id="rfc.section.6.4.p.1">Implementations MAY define additional keywords to JSON Schema. Save for explicit agreement, schema authors SHALL NOT expect these additional keywords to be supported by peer implementations. Implementations SHOULD ignore keywords they do not support. </p>
669669
<p id="rfc.section.6.4.p.2">Authors of extensions to JSON Schema are encouraged to write their own meta-schemas, which extend the existing meta-schemas using "allOf". This extended meta-schema SHOULD be referenced using the "$schema" keyword, to allow tools to follow the correct behaviour. </p>
670-
<p id="rfc.section.6.4.p.3">Note that the recursive nature of meta-schemas requires re-definining recursive keywords in the extended meta-schema, as can be seen in the JSON Hyper-Schema meta-schema. </p>
670+
<p id="rfc.section.6.4.p.3">Note that the recursive nature of meta-schemas requires re-defining recursive keywords in the extended meta-schema, as can be seen in the JSON Hyper-Schema meta-schema. </p>
671671
<h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a> The "$schema" Keyword</h1>
672672
<p id="rfc.section.7.p.1">The "$schema" keyword is both used as a JSON Schema version identifier and the ___location of a resource which is itself a JSON Schema, which describes any schema written for this particular version. </p>
673673
<p id="rfc.section.7.p.2">The value of this keyword MUST be a <a href="#RFC3986">URI</a> <cite title="NONE">[RFC3986]</cite> (containing a scheme) and this URI MUST be normalized. The current schema MUST be valid against the meta-schema identified by this URI. </p>
@@ -687,7 +687,7 @@ <h1 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1.</a> Initial Base URI</h
687687
<h1 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2.</a> <a href="#id-keyword" id="id-keyword">The "$id" Keyword</a></h1>
688688
<p id="rfc.section.9.2.p.1">The "$id" keyword defines a URI for the schema, and the base URI that other URI references within the schema are resolved against. A subschema's "$id" is resolved against the base URI of its parent schema. If no parent sets an explicit base with "$id", the base URI is that of the entire document, as determined per <a href="#RFC3986">RFC 3986 section 5</a> <cite title="NONE">[RFC3986]</cite>. </p>
689689
<p id="rfc.section.9.2.p.2">If present, the value for this keyword MUST be a string, and MUST represent a valid <a href="#RFC3986">URI-reference</a> <cite title="NONE">[RFC3986]</cite>. This value SHOULD be normalized, and SHOULD NOT be an empty fragment &lt;#&gt; or an empty string &lt;&gt;. </p>
690-
<p id="rfc.section.9.2.p.3">The root schema of a JSON Schema document SHOULD contain an "$id" keyword with a URI (containing a scheme). This URI SHOULD either not have a fragment, or have one that is an empty string. <a id="CREF3" class="info">[CREF3]<span class="info">How should an "$id" URI reference containing a fragement with other components be interpreted? There are two cases: when the other components match the current base URI and when they change the base URI. </span></a> </p>
690+
<p id="rfc.section.9.2.p.3">The root schema of a JSON Schema document SHOULD contain an "$id" keyword with a URI (containing a scheme). This URI SHOULD either not have a fragment, or have one that is an empty string. <a id="CREF3" class="info">[CREF3]<span class="info">How should an "$id" URI reference containing a fragment with other components be interpreted? There are two cases: when the other components match the current base URI and when they change the base URI. </span></a> </p>
691691
<p id="rfc.section.9.2.p.4">To name subschemas in a JSON Schema document, subschemas can use "$id" to give themselves a document-local identifier. This is done by setting "$id" to a URI reference consisting only of a plain name fragment (not a JSON Pointer fragment). The fragment identifier MUST begin with a letter ([A-Za-z]), followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), or periods ("."). </p>
692692
<p id="rfc.section.9.2.p.5">Providing a plain name fragment enables a subschema to be relocated within a schema without requiring that JSON Pointer references are updated. </p>
693693
<p id="rfc.section.9.2.p.6">The effect of defining a fragment-only "$id" URI reference that neither matches the above requirements nor is a valid JSON pointer is not defined. </p>
@@ -810,7 +810,7 @@ <h1 id="rfc.section.12"><a href="#rfc.section.12">12.</a> <a href="#security" id
810810
<p id="rfc.section.12.p.3">Servers need to take care that malicious parties can't change the functionality of existing schemas by uploading a schema with an pre-existing or very similar "$id". </p>
811811
<p id="rfc.section.12.p.4">Individual JSON Schema vocabularies are liable to also have their own security considerations. Consult the respective specifications for more information. </p>
812812
<p id="rfc.section.12.p.5">Schema authors should take care with "$comment" contents, as a malicious implementation can display them to end-users in violation of a spec, or fail to strip them if such behavior is expected. </p>
813-
<p id="rfc.section.12.p.6">A malicous schema author could place executable code or other dangerous material within a "$comment". Implementations MUST NOT parse or otherwise take action based on "$comment" contents. </p>
813+
<p id="rfc.section.12.p.6">A malicious schema author could place executable code or other dangerous material within a "$comment". Implementations MUST NOT parse or otherwise take action based on "$comment" contents. </p>
814814
<h1 id="rfc.section.13"><a href="#rfc.section.13">13.</a> IANA Considerations</h1>
815815
<h1 id="rfc.section.13.1"><a href="#rfc.section.13.1">13.1.</a> application/schema+json</h1>
816816
<p id="rfc.section.13.1.p.1">The proposed MIME media type for JSON Schema is defined as follows: </p>
@@ -931,7 +931,7 @@ <h1 id="rfc.appendix.B"><a href="#rfc.appendix.B">Appendix B.</a> ChangeLog</h1>
931931
<p/>
932932

933933
<dl>
934-
<dt>draft-TO-BE-DETERMINED-json-schema-NN</dt>
934+
<dt>draft-handrews-json-schema-00</dt>
935935
<dd style="margin-left: 8">
936936
<ul>
937937
<li>Reserve "$comment" for non-user-visible notes about the schema</li>

0 commit comments

Comments
 (0)