|
189 | 189 | <t>
|
190 | 190 | A JSON Schema document, or simply a schema, is a JSON document used to describe an instance.
|
191 | 191 | A schema is itself interpreted as an instance.
|
192 |
| - A JSON Schema MUST be an object or a boolean, where boolean values are equivalent to object schemas as follows. |
| 192 | + A JSON Schema MUST be an object or a boolean. |
| 193 | + </t> |
| 194 | + <t> |
| 195 | + Boolean values are equivalent to the following behaviors: |
| 196 | + <list style="hanging"> |
| 197 | + <t hangText="true">Always passes validation, as if the empty schema {}</t> |
| 198 | + <t hangText="false">Always fails validation, as if the schema { "not":{} }</t> |
| 199 | + </list> |
193 | 200 | </t>
|
194 |
| - <figure> |
195 |
| - <preamble> |
196 |
| - true: |
197 |
| - </preamble> |
198 |
| - <artwork> |
199 |
| -<![CDATA[ |
200 |
| -{} |
201 |
| -]]> |
202 |
| - </artwork> |
203 |
| - </figure> |
204 |
| - <figure> |
205 |
| - <preamble> |
206 |
| - false: |
207 |
| - </preamble> |
208 |
| - <artwork> |
209 |
| -<![CDATA[ |
210 |
| -{ |
211 |
| - "not": {} |
212 |
| -} |
213 |
| -]]> |
214 |
| - </artwork> |
215 |
| - </figure> |
216 | 201 | <t>
|
217 | 202 | Properties that are used to describe the instance are called keywords, or schema keywords.
|
218 | 203 | The meaning of properties is specified by the vocabulary that the schema is using.
|
|
254 | 239 | and the schema titled "root" is the root schema.
|
255 | 240 | </t>
|
256 | 241 | <t>
|
257 |
| - As with the root schema, a subschema MUST be an object or a boolean. |
| 242 | + As with the root schema, a subschema is either an object or a boolean. |
258 | 243 | </t>
|
259 | 244 | </section>
|
260 | 245 |
|
|
324 | 309 |
|
325 | 310 | <section title="Schema references with $ref">
|
326 | 311 | <t>
|
327 |
| - In addition to a boolean value or an object using schema kewyords defined |
328 |
| - in the meta-schema, a schema may be represnted by an object containing a "$ref" property. |
329 |
| - The value of the $ref is a URI Reference. |
| 312 | + The "$ref" keyword is used to reference a schema, and provides the ability to validate recursive structures through self-reference. |
| 313 | + </t> |
| 314 | + <t> |
| 315 | + An object schema with a "$ref" property MUST be interpreted as a "$ref" reference. |
| 316 | + The value of the "$ref" property MUST be a URI Reference. |
330 | 317 | Resolved against the current URI base, it identifies the URI of a schema to use.
|
331 | 318 | All other properties in a "$ref" object MUST be ignored.
|
332 | 319 | </t>
|
|
0 commit comments