Draft 3 Dialect
JSON Schema Draft 3 is a JSON media type that provides a contract for what JSON data is required for a given application and how to interact with it. JSON Schema is intended to define validation, documentation, hyperlink navigation, and interaction control of JSON data.
Specification | https://json-schema.org/draft-03/draft-zyp-json-schema-03.pdf |
---|---|
Authors | |
Metaschema | http://json-schema.org/draft-03/schema# |
Implementations | https://bowtie.report/#/dialects/draft3 |
Using this dialect
To make use of this dialect, declare your schemas to have the dialect metaschema using the $schema keyword. For example:
{
"$schema": "http://json-schema.org/draft-03/schema#"
}
Citing this dialect
The recommended way to cite the JSON Schema Draft 3 dialect using BibTex is as follows:
@techreport{json-schema-draft3,
title = { A JSON Media Type for Describing the Structure and Meaning of JSON Documents },
author = { Zyp, Kris and Court, Gary },
organization = { JSON Schema },
year = { 2010 },
url = { https://json-schema.org/draft-03/draft-zyp-json-schema-03.pdf }
}
Vocabularies
A curated set of vocabularies defined for this JSON Schema dialect.
Core Official Included By Default
This vocabulary defines JSON Schema core terminology and mechanisms; related specifications build upon this specification and define different applications of JSON Schema. Read more about this vocabulary.
Keyword | Kind | Instance | Summary |
---|---|---|---|
id | Identifier | Any | This keyword declares an identifier for the schema resource. |
$schema | Identifier | Any | This keyword is both used as a JSON Schema dialect identifier and as a reference to a JSON Schema which describes the set of valid schemas written for this particular dialect. |
$ref | Applicator | Any | This keyword is used to reference a statically identified schema. |
extends | Applicator | Any | Validation succeeds if the instance is valid against the schema or schemas defined by this keyword |
type | Assertion | Any | Validation succeeds if the type of the instance matches the type represented by the given type, or matches at least one of the given types. |
disallow | Assertion | Any | Validation succeeds if the type of the instance does not match the type represented by the given type, or does not match at least one of the given types. |
properties | Applicator | Object | Validation succeeds if, for each name that appears in both the instance and as a name within this keyword’s value, the child instance for that name successfully validates against the corresponding schema. |
patternProperties | Applicator | Object | Validation succeeds if, for each instance name that matches any regular expressions that appear as a property name in this keyword’s value, the child instance for that name successfully validates against each schema that corresponds to a matching regular expression. |
additionalProperties | Applicator | Object | Validation succeeds if the schema validates against each value not matched by other object applicators in this vocabulary. If set to a boolean, no additional properties are allowed in the instance. |
items | Applicator | Array | If set to a schema, validation succeeds if each element of the instance validates against it. If set to an array, validation succeeds if each element of the instance validates against the schema at the same position, if any. |
additionalItems | Applicator | Array | If items is set to an array of schemas, validation succeeds if each element of the instance not covered by it validates against this schema. If set to a boolean, no additional items are allowed in the array instance. |
minItems | Assertion | Array | An array instance is valid if its size is greater than, or equal to, the value of this keyword. |
maxItems | Assertion | Array | An array instance is valid if its size is less than, or equal to, the value of this keyword. |
uniqueItems | Assertion | Array | If this keyword is set to the boolean value true, the instance validates successfully if all of its elements are unique. |
required | Assertion | Object | An object instance is valid if the name of the required property exists in the instance. |
dependencies | Assertion | Object | Validation succeeds if, for each name that appears in both the instance and as a name within this keyword’s value, either every item in the corresponding array is also the name of a property in the instance or the corresponding subschema successfully evaluates against the instance. |
enum | Assertion | Any | Validation succeeds if the instance is equal to one of the elements in this keyword’s array value. |
pattern | Assertion | String | A string instance is considered valid if the regular expression matches the instance successfully. |
minLength | Assertion | String | A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword. |
maxLength | Assertion | String | A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword. |
divisibleBy | Assertion | Number | A numeric instance is valid only if division by this keyword’s value results in an integer. |
minimum | Assertion | Number | Validation succeeds if the numeric instance is greater than, or equal to, the given number, depending on the value of exclusiveMinimum , if any. |
exclusiveMinimum | Assertion | Number | When minimum is present and this keyword is set to true, the numeric instance must be greater than the value in minimum . |
maximum | Assertion | Number | Validation succeeds if the numeric instance is less than, or equal to, the given number, depending on the value of exclusiveMaximum , if any. |
exclusiveMaximum | Assertion | Number | Validation succeeds if the numeric instance is less than the given number. |
format | Annotation | String | Define semantic information about a string instance. |
description | Annotation | Any | An explanation about the purpose of the instance described by the schema. |
title | Annotation | Any | A preferably short description about the purpose of the instance described by the schema. |
default | Annotation | Any | This keyword can be used to supply a default JSON value associated with a particular schema. |