From 2784b50325f3cafcd5da96f310036a616d3baad9 Mon Sep 17 00:00:00 2001
From: Henry Andrews <henry@cloudflare.com>
Date: Tue, 29 Nov 2016 12:09:31 -0800
Subject: [PATCH] Allow boolean subschemas everywhere.

This is one alternative for issue #101.

If accepted, the meta-schema change will come separately after
PR #168 is merged.
---
 jsonschema-core.xml       | 29 +++++++++++++++++++++++++++--
 jsonschema-validation.xml | 22 +++++++++-------------
 2 files changed, 36 insertions(+), 15 deletions(-)

diff --git a/jsonschema-core.xml b/jsonschema-core.xml
index f387940c..07b96ff8 100644
--- a/jsonschema-core.xml
+++ b/jsonschema-core.xml
@@ -189,7 +189,7 @@
                 <t>
                     A JSON Schema document, or simply a schema, is a JSON document used to describe an instance.
                     A schema is itself interpreted as an instance.
-                    A JSON schema MUST be an object.
+                    A JSON Schema document MUST consist of an object, known as the root schema.
                 </t>
                 <t>
                     Properties that are used to describe the instance are called keywords, or schema keywords.
@@ -231,6 +231,31 @@
                     In this example document, the schema titled "array item" is a subschema,
                     and the schema titled "root" is the root schema.
                 </t>
+                <t>
+                    A subschema MUST be an object or a boolean, where boolean values are equivalent to object schemas as follows:
+                </t>
+                <t>
+                    true:
+                </t>
+                <figure>
+                    <artwork>
+<![CDATA[
+{}
+]]>
+                    </artwork>
+                </figure>
+                <t>
+                    false:
+                </t>
+                <figure>
+                    <artwork>
+<![CDATA[
+{
+    "not": {}
+}
+]]>
+                    </artwork>
+                </figure>
             </section>
 
         </section>
@@ -323,7 +348,7 @@
                     <xref target="RFC3986">RFC3986 Section 5.1</xref> defines how to determine the default base URI of a document.
                 </t>
                 <t>
-                    Informatively, the initial base URI of a schema is the URI it was found at, or a suitable substitute URI if none is known.
+                    Informatively, the initial base URI of a schema is the URI at which it was found, or a suitable substitute URI if none is known.
                 </t>
             </section>
 
diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml
index 7bbd6c70..3743a7e5 100644
--- a/jsonschema-validation.xml
+++ b/jsonschema-validation.xml
@@ -327,8 +327,7 @@
 
             <section title="items">
                 <t>
-                    The value of "items" MUST be either an object or an array of objects.
-                    Each object MUST be a valid JSON Schema.
+                    The value of "items" MUST be either a valid subschema or an array of valid subschemas.
                 </t>
                 <t>
                     If absent, it can be considered present with an empty schema.
@@ -350,8 +349,7 @@
 
             <section title="additionalItems">
                 <t>
-                    The value of "additionalItems" MUST be a boolean or an object.
-                    If it is an object, the object MUST be a valid JSON Schema.
+                    The value of "additionalItems" MUST be a valid subschema.
                 </t>
                 <t>
                     If absent, it can be considered present with an empty schema.
@@ -466,7 +464,7 @@
             <section title="properties">
                 <t>
                     The value of "properties" MUST be an object. Each value of this object
-                    MUST be an object, and each object MUST be a valid JSON Schema.
+                    MUST be a valid subschema.
                 </t>
                 <t>
                     If absent, it can be considered the same as an empty object.
@@ -487,7 +485,7 @@
                     The value of "patternProperties" MUST be an object. Each property name
                     of this object SHOULD be a valid regular expression, according to the
                     ECMA 262 regular expression dialect. Each property value of this object
-                    MUST be an object, and each object MUST be a valid JSON Schema.
+                    MUST be a valid subschema.
                 </t>
                 <t>
                     If absent, it can be considered the same as an empty object.
@@ -506,8 +504,7 @@
 
             <section title="additionalProperties">
                 <t>
-                    The value of "additionalProperties" MUST be a boolean or an
-                    object.  If it is an object, the object MUST be a valid JSON Schema.
+                    The value of "additionalProperties" MUST be a valid subschema.
                 </t>
                 <t>
                     If "additionalProperties" is absent, it may be considered present with
@@ -535,12 +532,11 @@
                 </t>
                 <t>
                     This keyword's value MUST be an object. Each property specifies a dependency.
-                    Each dependency value MUST be an object or an array.
+                    Each dependency value MUST be an array or a valid subschema.
                 </t>
                 <t>
-                    If the dependency value is an object, it MUST be a valid JSON Schema. If the
-                    dependency key is a property in the instance, the dependency value must validate
-                    against the entire instance.
+                    If the dependency value is a subschema, and the dependency key is a property
+                    in the instance, the entire instance must validate against the dependency value.
                 </t>
                 <t>
                     If the dependency value is an array, each element in the array,
@@ -649,7 +645,7 @@
             <section title="definitions">
                 <t>
                     This keyword's value MUST be an object. Each member value of this object
-                    MUST be a valid JSON Schema.
+                    MUST be a valid subschema.
                 </t>
                 <t>
                     This keyword plays no role in validation per se. Its role is to provide