diff --git a/.github/workflows/website-build.yml b/.github/workflows/website-build.yml index d68cfbe9..b71a6f18 100644 --- a/.github/workflows/website-build.yml +++ b/.github/workflows/website-build.yml @@ -7,6 +7,13 @@ concurrency: cancel-in-progress: true jobs: + codespell: + runs-on: ubuntu-latest + steps: + - run: sudo apt-get update && sudo apt-get install --yes codespell + - uses: actions/checkout@v4 + - run: codespell content + build: runs-on: ubuntu-latest steps: diff --git a/Dockerfile b/Dockerfile index 10eb16bb..cc78d313 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM debian:bookworm-slim RUN apt-get update \ - && apt-get install -y make nodejs npm curl ca-certificates \ + && apt-get install -y make nodejs npm curl ca-certificates codespell \ && rm -rf /var/lib/apt/lists/* ARG HUGO_VERSION=0.147.2 diff --git a/Makefile b/Makefile index 9c5db553..d81a129d 100644 --- a/Makefile +++ b/Makefile @@ -4,16 +4,19 @@ HUGO ?= hugo RMRF ?= rm -rf NPM ?= npm DOCKER ?= docker +CODESPELL ?= codespell node_modules: package.json package-lock.json $(NPM) ci .PHONY: all all: node_modules + $(CODESPELL) content $(HUGO) server --buildDrafts --environment development .PHONY: html html: node_modules + $(CODESPELL) content $(HUGO) --environment production --destination dist .PHONY: clean diff --git a/content/2019-09/applicator/allOf.markdown b/content/2019-09/applicator/allOf.markdown index 3a700fdb..43b5d7cd 100644 --- a/content/2019-09/applicator/allOf.markdown +++ b/content/2019-09/applicator/allOf.markdown @@ -37,8 +37,8 @@ subschema (the intersection of the constraints). {{}} Wrapping a single instance of the [`$ref`]({{< ref "2019-09/core/ref" >}}) or [`$recursiveRef`]({{< ref -"2019-09/core/recursiveref" >}}) keyword in an `allOf` operator is an -anti-pattern. +"2019-09/core/recursiveref" >}}) keyword in an [`allOf`]({{< ref +"2019-09/applicator/allof" >}}) operator is an anti-pattern. This practice has historical roots. In JSON Schema [Draft 7](/draft7) and earlier versions, any subschema declaring the [`$ref`]({{< ref diff --git a/content/2019-09/applicator/patternProperties.markdown b/content/2019-09/applicator/patternProperties.markdown index a341d850..2684c931 100644 --- a/content/2019-09/applicator/patternProperties.markdown +++ b/content/2019-09/applicator/patternProperties.markdown @@ -1,7 +1,7 @@ --- keyword: "patternProperties" signature: "Object" -value: This keyword must be set to an object where each key is a valid regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema +value: This keyword must be set to an object where each key is a valid regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema summary: "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." kind: [ "applicator", "annotation" ] instance: [ "object" ] diff --git a/content/2019-09/applicator/propertyNames.markdown b/content/2019-09/applicator/propertyNames.markdown index bdd00956..49153592 100644 --- a/content/2019-09/applicator/propertyNames.markdown +++ b/content/2019-09/applicator/propertyNames.markdown @@ -85,7 +85,7 @@ the object by setting the [`additionalProperties`]({{< ref "Hello World" {{}} -{{}} +{{}} { "$schema": "https://json-schema.org/draft/2019-09/schema", "propertyNames": { "type": "array" } diff --git a/content/2019-09/applicator/unevaluatedItems.markdown b/content/2019-09/applicator/unevaluatedItems.markdown index 6c30fe80..eb46236e 100644 --- a/content/2019-09/applicator/unevaluatedItems.markdown +++ b/content/2019-09/applicator/unevaluatedItems.markdown @@ -29,7 +29,7 @@ The [`unevaluatedItems`]({{< ref "2019-09/applicator/unevaluateditems" >}}) keyword is a generalisation of the [`additionalItems`]({{< ref "2019-09/applicator/additionalitems" >}}) keyword that considers related keywords even when they are not direct siblings of this keyword. More -specifically, this keyword is affected by occurences of [`items`]({{< ref +specifically, this keyword is affected by occurrences of [`items`]({{< ref "2019-09/applicator/items" >}}), [`additionalItems`]({{< ref "2019-09/applicator/additionalitems" >}}), and [`unevaluatedItems`]({{< ref "2019-09/applicator/unevaluateditems" >}}) itself, as long as the evaluate path @@ -45,7 +45,7 @@ There are two common use cases for this keyword, both for reducing duplication: (1) Elegantly describing additional array items while declaring the [`items`]({{< ref "2019-09/applicator/items" >}}) or [`additionalItems`]({{< ref "2019-09/applicator/additionalitems" >}}) keywords behind conditional logic -without duplicating these keywords in every possible branch. (2) Re-using +without duplicating these keywords in every possible branch. (2) Reusing helpers that consist of the [`items`]({{< ref "2019-09/applicator/items" >}}) or [`additionalItems`]({{< ref "2019-09/applicator/additionalitems" >}}) keywords, while specialising the helpers as needed in specific locations diff --git a/content/2019-09/applicator/unevaluatedProperties.markdown b/content/2019-09/applicator/unevaluatedProperties.markdown index 520cd8e8..d2080434 100644 --- a/content/2019-09/applicator/unevaluatedProperties.markdown +++ b/content/2019-09/applicator/unevaluatedProperties.markdown @@ -32,7 +32,7 @@ The [`unevaluatedProperties`]({{< ref of the [`additionalProperties`]({{< ref "2019-09/applicator/additionalproperties" >}}) keyword that considers related keywords even when they are not direct siblings of this keyword. More -specifically, this keyword is affected by occurences of [`properties`]({{< +specifically, this keyword is affected by occurrences of [`properties`]({{< ref "2019-09/applicator/properties" >}}), [`patternProperties`]({{< ref "2019-09/applicator/patternproperties" >}}), [`additionalProperties`]({{< ref "2019-09/applicator/additionalproperties" >}}), and @@ -52,7 +52,7 @@ declaring the [`properties`]({{< ref "2019-09/applicator/properties" >}}) or [`patternProperties`]({{< ref "2019-09/applicator/patternproperties" >}}) keywords behind conditional logic without duplicating the [`additionalProperties`]({{< ref "2019-09/applicator/additionalproperties" ->}}) keyword in every possible branch. (2) Re-using helpers that consist of +>}}) keyword in every possible branch. (2) Reusing helpers that consist of the [`properties`]({{< ref "2019-09/applicator/properties" >}}), [`patternProperties`]({{< ref "2019-09/applicator/patternproperties" >}}), or [`additionalProperties`]({{< ref "2019-09/applicator/additionalproperties" diff --git a/content/2019-09/core/defs.markdown b/content/2019-09/core/defs.markdown index 2810ea4a..851db103 100644 --- a/content/2019-09/core/defs.markdown +++ b/content/2019-09/core/defs.markdown @@ -2,7 +2,7 @@ keyword: "$defs" signature: "Object" value: This keyword must be set to an object where each value is a valid JSON Schema -summary: "This keyword reserves a location for schema authors to inline re-usable JSON Schemas into a more general schema." +summary: "This keyword reserves a location for schema authors to inline reusable JSON Schemas into a more general schema." kind: [ "location" ] instance: [ "any" ] specification: "https://json-schema.org/draft/2019-09/draft-handrews-json-schema-02#rfc.section.8.2.5" @@ -21,7 +21,7 @@ related: --- The [`$defs`]({{< ref "2019-09/core/defs" >}}) keyword is a container for -storing re-usable schemas within a schema resource, which can be referenced +storing reusable schemas within a schema resource, which can be referenced using the [`$ref`]({{< ref "2019-09/core/ref" >}}) or [`$recursiveRef`]({{< ref "2019-09/core/recursiveref" >}}) keywords. From a software engineering point of view, this keyword is analogous to defining _internal_ helper diff --git a/content/2019-09/core/recursiveAnchor.markdown b/content/2019-09/core/recursiveAnchor.markdown index f971b650..d21cc0a9 100644 --- a/content/2019-09/core/recursiveAnchor.markdown +++ b/content/2019-09/core/recursiveAnchor.markdown @@ -31,7 +31,7 @@ fragment identifier and records this association in the [dynamic scope](https://json-schema.org/blog/posts/dynamicref-and-generics). When resolving this anchor using the [`$recursiveRef`]({{< ref "2019-09/core/recursiveref" >}}) keyword, the base URI of the origin is not -considered. Instead, evaluation jumps to the first encountered occurence of the +considered. Instead, evaluation jumps to the first encountered occurrence of the given recursive anchor in the [stack of schema resources](https://json-schema.org/blog/posts/understanding-lexical-dynamic-scopes#the-dynamic-scope-as-a-stack) traversed so far. @@ -102,7 +102,7 @@ $ jsonschema validate custom-metaschema.json schema.json --trace } {{}} -{{}} +{{}} { "my-custom-keyword": "foo" } {{}} @@ -110,7 +110,7 @@ $ jsonschema validate custom-metaschema.json schema.json --trace { "keyword": "/properties", "instance": "", "value": [ "my-custom-keyword" ] } {{}} -{{}} +{{}} { "additionalProperties": { "my-custom-keyword": "foo" } } {{}} @@ -118,6 +118,6 @@ $ jsonschema validate custom-metaschema.json schema.json --trace { "keyword": "/properties", "instance": "/additionalProperties", "value": [ "my-custom-keyword" ] } {{}} -{{}} +{{}} { "additionalProperties": { "my-custom-keyword": 1 } } {{}} diff --git a/content/2019-09/core/recursiveRef.markdown b/content/2019-09/core/recursiveRef.markdown index 6609d752..0300c116 100644 --- a/content/2019-09/core/recursiveRef.markdown +++ b/content/2019-09/core/recursiveRef.markdown @@ -31,7 +31,7 @@ the [`$recursiveAnchor`]({{< ref "2019-09/core/recursiveanchor" >}}) keyword. When resolving a recursive anchor using this keyword, the base URI of the origin is not considered. Instead, the evaluator looks in the [dynamic scope](https://json-schema.org/blog/posts/dynamicref-and-generics) and jumps to -the first encountered occurence of the recursive anchor in the [stack of schema +the first encountered occurrence of the recursive anchor in the [stack of schema resources](https://json-schema.org/blog/posts/understanding-lexical-dynamic-scopes#the-dynamic-scope-as-a-stack) traversed so far. @@ -39,7 +39,7 @@ In other words, **think of a schema declaring the recursive reference as a reference that considers that its destination might have been re-defined by a parent schema**. For example, a schema that references the recursive anchor says: _"jump to the location set by the recursive anchor, but if there are -overriden variants of it, jump to the first of those instead"_. +overridden variants of it, jump to the first of those instead"_. {{}}The [`$recursiveRef`]({{< ref "2019-09/core/recursiveref" >}}) keyword only supports the special empty fragment `"#"` and it cannot be @@ -112,7 +112,7 @@ $ jsonschema validate custom-metaschema.json schema.json --trace } {{}} -{{}} +{{}} { "my-custom-keyword": "foo" } {{}} @@ -120,7 +120,7 @@ $ jsonschema validate custom-metaschema.json schema.json --trace { "keyword": "/properties", "instance": "", "value": [ "my-custom-keyword" ] } {{}} -{{}} +{{}} { "additionalProperties": { "my-custom-keyword": "foo" } } {{}} @@ -128,6 +128,6 @@ $ jsonschema validate custom-metaschema.json schema.json --trace { "keyword": "/properties", "instance": "/additionalProperties", "value": [ "my-custom-keyword" ] } {{}} -{{}} +{{}} { "additionalProperties": { "my-custom-keyword": 1 } } {{}} diff --git a/content/2019-09/format/format.markdown b/content/2019-09/format/format.markdown index 508326de..d75ff07f 100644 --- a/content/2019-09/format/format.markdown +++ b/content/2019-09/format/format.markdown @@ -1,7 +1,7 @@ --- keyword: "format" signature: "String" -value: This keyword must be set to a string, preferrably one that is standardized by JSON Schema to ensure interoperability +value: This keyword must be set to a string, preferably one that is standardized by JSON Schema to ensure interoperability summary: "Define semantic information about a string instance." kind: [ "annotation" ] instance: [ "string" ] diff --git a/content/2019-09/meta-data/default.markdown b/content/2019-09/meta-data/default.markdown index 04234f78..07828c78 100644 --- a/content/2019-09/meta-data/default.markdown +++ b/content/2019-09/meta-data/default.markdown @@ -1,7 +1,7 @@ --- keyword: "default" signature: "Any" -value: This keyword must be set to a JSON value, preferrably that successfully validates against the corresponding subschema +value: This keyword must be set to a JSON value, preferably that successfully validates against the corresponding subschema summary: "This keyword can be used to supply a default JSON value associated with a particular schema." kind: [ "annotation" ] instance: [ "any" ] diff --git a/content/2019-09/meta-data/deprecated.markdown b/content/2019-09/meta-data/deprecated.markdown index cc970d35..892a6af5 100644 --- a/content/2019-09/meta-data/deprecated.markdown +++ b/content/2019-09/meta-data/deprecated.markdown @@ -45,7 +45,7 @@ an annotation that does not carry any additional meaning. {{}} Tooling makers must be careful when statically traversing schemas in search of -occurences of this keyword. It is possible for schemas to make use of this +occurrences of this keyword. It is possible for schemas to make use of this keyword behind conditional operators, references, or any other type of keyword that makes it hard or even impossible to correctly locate these values without fully evaluating the schema against an instance. The only bullet proof method diff --git a/content/2019-09/meta-data/description.markdown b/content/2019-09/meta-data/description.markdown index 421474e8..2d968a30 100644 --- a/content/2019-09/meta-data/description.markdown +++ b/content/2019-09/meta-data/description.markdown @@ -46,7 +46,7 @@ concise summary altogether. {{}} Tooling makers must be careful when statically traversing schemas in search of -occurences of this keyword. It is possible for schemas to make use of this +occurrences of this keyword. It is possible for schemas to make use of this keyword behind conditional operators, references, or any other type of keyword that makes it hard or even impossible to correctly locate these values without fully evaluating the schema against an instance. The only bullet proof method diff --git a/content/2019-09/meta-data/examples.markdown b/content/2019-09/meta-data/examples.markdown index d06e1a7e..cf444786 100644 --- a/content/2019-09/meta-data/examples.markdown +++ b/content/2019-09/meta-data/examples.markdown @@ -1,7 +1,7 @@ --- keyword: "examples" signature: "Array" -value: This keyword must be set to an array of JSON values that preferrably successfully validates against the corresponding subschema +value: This keyword must be set to an array of JSON values that preferably successfully validates against the corresponding subschema summary: "This keyword is used to provide sample JSON values associated with a particular schema, for the purpose of illustrating usage." kind: [ "annotation" ] instance: [ "any" ] diff --git a/content/2019-09/meta-data/readOnly.markdown b/content/2019-09/meta-data/readOnly.markdown index c5e919e4..7304164d 100644 --- a/content/2019-09/meta-data/readOnly.markdown +++ b/content/2019-09/meta-data/readOnly.markdown @@ -51,7 +51,7 @@ location, resulting in ambiguous semantics. {{}} Tooling makers must be careful when statically traversing schemas in search of -occurences of this keyword. It is possible for schemas to make use of this +occurrences of this keyword. It is possible for schemas to make use of this keyword behind conditional operators, references, or any other type of keyword that makes it hard or even impossible to correctly locate these values without fully evaluating the schema against an instance. The only bullet proof method diff --git a/content/2019-09/meta-data/title.markdown b/content/2019-09/meta-data/title.markdown index 0c767745..eb63734a 100644 --- a/content/2019-09/meta-data/title.markdown +++ b/content/2019-09/meta-data/title.markdown @@ -50,7 +50,7 @@ you run out of space, you can move the additional information to the {{}} Tooling makers must be careful when statically traversing schemas in search of -occurences of this keyword. It is possible for schemas to make use of this +occurrences of this keyword. It is possible for schemas to make use of this keyword behind conditional operators, references, or any other type of keyword that makes it hard or even impossible to correctly locate these values without fully evaluating the schema against an instance. The only bullet proof method diff --git a/content/2019-09/meta-data/writeOnly.markdown b/content/2019-09/meta-data/writeOnly.markdown index 0f7783c5..3408ae2e 100644 --- a/content/2019-09/meta-data/writeOnly.markdown +++ b/content/2019-09/meta-data/writeOnly.markdown @@ -51,7 +51,7 @@ location, resulting in ambiguous semantics. {{}} Tooling makers must be careful when statically traversing schemas in search of -occurences of this keyword. It is possible for schemas to make use of this +occurrences of this keyword. It is possible for schemas to make use of this keyword behind conditional operators, references, or any other type of keyword that makes it hard or even impossible to correctly locate these values without fully evaluating the schema against an instance. The only bullet proof method diff --git a/content/2019-09/validation/const.markdown b/content/2019-09/validation/const.markdown index 34717adb..d9c142c3 100644 --- a/content/2019-09/validation/const.markdown +++ b/content/2019-09/validation/const.markdown @@ -29,7 +29,7 @@ anti-pattern.{{}} {{}} There are programming languages, such as JavaScript, that [cannot distinguish between integers and real -numbers](https://2ality.com/2012/04/number-encoding.html). To accomodate for +numbers](https://2ality.com/2012/04/number-encoding.html). To accommodate for those cases, JSON Schema considers a real number with a zero fractional part to be equal to the corresponding integer. For example, in JSON Schema, `1` is considered to be equal to `1.0`.{{}} diff --git a/content/2019-09/validation/enum.markdown b/content/2019-09/validation/enum.markdown index 9a5baf9f..10de03ae 100644 --- a/content/2019-09/validation/enum.markdown +++ b/content/2019-09/validation/enum.markdown @@ -33,7 +33,7 @@ anti-pattern.{{}} {{}} There are programming languages, such as JavaScript, that [cannot distinguish between integers and real -numbers](https://2ality.com/2012/04/number-encoding.html). To accomodate for +numbers](https://2ality.com/2012/04/number-encoding.html). To accommodate for those cases, JSON Schema considers a real number with a zero fractional part to be equal to the corresponding integer. For example, in JSON Schema, `1` is considered to be equal to `1.0`.{{}} diff --git a/content/2019-09/validation/multipleOf.markdown b/content/2019-09/validation/multipleOf.markdown index 85a6a653..4270b88c 100644 --- a/content/2019-09/validation/multipleOf.markdown +++ b/content/2019-09/validation/multipleOf.markdown @@ -27,7 +27,7 @@ related: The [`multipleOf`]({{< ref "2019-09/validation/multipleof" >}}) keyword restricts number instances to be multiples of the given number. Note that the number `0` is a multiple of every number, as for every number `k`, the -mutiplication `0 * k` yield an integer value (in this case always 0). This case +multiplication `0 * k` yield an integer value (in this case always 0). This case is not to be confused with [division by zero](https://en.wikipedia.org/wiki/Division_by_zero), which is not a permitted operation in most computer systems. diff --git a/content/2019-09/validation/pattern.markdown b/content/2019-09/validation/pattern.markdown index 8c8e4eff..45ee2d98 100644 --- a/content/2019-09/validation/pattern.markdown +++ b/content/2019-09/validation/pattern.markdown @@ -1,7 +1,7 @@ --- keyword: "pattern" signature: "String" -value: This keyword must be set to a regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour +value: This keyword must be set to a regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour summary: "A string instance is considered valid if the regular expression matches the instance successfully." kind: [ "assertion" ] instance: [ "string" ] diff --git a/content/2019-09/validation/type.markdown b/content/2019-09/validation/type.markdown index 99bf64ba..281ca650 100644 --- a/content/2019-09/validation/type.markdown +++ b/content/2019-09/validation/type.markdown @@ -64,7 +64,7 @@ Rauschmayer for a more detailed overview of JavaScript's numeric limitations.{{}} {{}}JSON allows numbers to be represented in [scientific -expontential +exponential notation](https://en.wikipedia.org/wiki/Scientific_notation#E_notation). For example, numbers like `1.0e+28` (equivalent to 10000000000000000000000000000.0) are valid according to the JSON grammar. This notation is convenient for @@ -90,7 +90,7 @@ standard.{{}} 3.14 {{< /instance-pass >}} -{{< instance-pass "A number in scientific expontential notation is valid" >}} +{{< instance-pass "A number in scientific exponential notation is valid" >}} 1.0e+28 {{< /instance-pass >}} diff --git a/content/2020-12/applicator/additionalProperties.markdown b/content/2020-12/applicator/additionalProperties.markdown index e23124be..f9f6df20 100644 --- a/content/2020-12/applicator/additionalProperties.markdown +++ b/content/2020-12/applicator/additionalProperties.markdown @@ -41,12 +41,12 @@ related: keyword: unevaluatedProperties --- -The `additionalProperties` keyword restricts object instance properties not -described by the _sibling_ [`properties`]({{< ref -"2020-12/applicator/properties" ->}}) and [`patternProperties`]({{< ref "2020-12/applicator/patternproperties" ->}}) keywords (if any), to validate against the given subschema. Information -about the properties that this keyword was evaluated for is reported using +The [`additionalProperties`]({{< ref "2020-12/applicator/additionalProperties" >}}) +keyword restricts object instance properties not described by the _sibling_ +[`properties`]({{< ref "2020-12/applicator/properties" >}}) and +[`patternProperties`]({{< ref "2020-12/applicator/patternproperties" >}}) +keywords (if any), to validate against the given subschema. Information about +the properties that this keyword was evaluated for is reported using annotations. {{}}The use of the [`properties`]({{< ref diff --git a/content/2020-12/applicator/allOf.markdown b/content/2020-12/applicator/allOf.markdown index fc777a0c..4561710c 100644 --- a/content/2020-12/applicator/allOf.markdown +++ b/content/2020-12/applicator/allOf.markdown @@ -35,16 +35,17 @@ conjunction](https://en.wikipedia.org/wiki/Logical_conjunction) (AND) operation, as instances are valid if they satisfy every constraint of every subschema (the intersection of the constraints). -{{}} Wrapping a single instance of the [`$ref`](../../core/ref) -or [`$dynamicRef`](../../core/dynamicref) keyword in an `allOf` operator is an -anti-pattern. +{{}} Wrapping a single instance of the +[`$ref`]({{< ref "2020-12/core/ref" >}}) or [`$dynamicRef`]({{< ref +"2020-12/core/dynamicref" >}}) keyword in an [`allOf`]({{< ref +"2020-12/applicator/allof" >}}) operator is an anti-pattern. This practice has historical roots. In JSON Schema [Draft 7](/draft7) and -earlier versions, any subschema declaring the `$ref` keyword was considered to -be a _reference object_ and any other sibling keyword was silently ignored. As -a consequence, subschemas with references that made use of other keywords had -to artificially wrap the reference into its own subschema. -{{}} +earlier versions, any subschema declaring the [`$ref`]({{< ref +"2020-12/core/ref" >}}) keyword was considered to be a _reference object_ and +any other sibling keyword was silently ignored. As a consequence, subschemas +with references that made use of other keywords had to artificially wrap the +reference into its own subschema. {{}} {{}}This keyword typically has a single use case: combining _multiple_ schemas through the use of (internal or external) references. If @@ -125,7 +126,8 @@ result of this keyword given 3 subschemas: A, B, and C. ## Examples -{{}} +{{}} { "$schema": "https://json-schema.org/draft/2020-12/schema", "allOf": [ diff --git a/content/2020-12/applicator/contains.markdown b/content/2020-12/applicator/contains.markdown index b878d99c..5e170c30 100644 --- a/content/2020-12/applicator/contains.markdown +++ b/content/2020-12/applicator/contains.markdown @@ -38,14 +38,14 @@ related: keyword: uniqueItems --- -The `contains` keyword restricts array instances to include one or more items -(at any location of the array) that validate against the given subschema. The -lower and upper bounds that are allowed to validate against the given subschema -can be controlled using the [`minContains`]({{< ref -"2020-12/validation/mincontains" >}}) and [`maxContains`]({{< ref -"2020-12/validation/maxcontains" >}}) keywords. Information about the items -that were successfully validated against the given subschema is reported using -annotations. +The [`contains`]({{< ref "2020-12/applicator/contains" >}}) keyword restricts array +instances to include one or more items (at any location of the array) that +validate against the given subschema. The lower and upper bounds that are +allowed to validate against the given subschema can be controlled using the +[`minContains`]({{< ref "2020-12/validation/mincontains" >}}) and +[`maxContains`]({{< ref "2020-12/validation/maxcontains" >}}) keywords. +Information about the items that were successfully validated against the given +subschema is reported using annotations. {{}}Keep in mind that when collecting annotations, the evaluator might need to exhaustively check every item in the array past the @@ -53,13 +53,13 @@ containment lower bound instead of short-circuiting validation, potentially introducing additional computational overhead. For example, consider an array of 10 items where 5 of its items validate -against the `contains` subschema (and neither [`minContains`]({{< ref -"2020-12/validation/mincontains" >}}) nor [`maxContains`]({{< ref -"2020-12/validation/maxcontains" >}}) -are declared, for simplicity). When not collecting annotations, validation will -stop after encountering the first match. However, when collecting annotations, -validation will have to proceed past the first match to report the 5 matching -indexes.{{}} +against the [`contains`]({{< ref "2020-12/applicator/contains" >}}) subschema (and neither +[`minContains`]({{< ref "2020-12/validation/mincontains" >}}) nor +[`maxContains`]({{< ref "2020-12/validation/maxcontains" >}}) are declared, for +simplicity). When not collecting annotations, validation will stop after +encountering the first match. However, when collecting annotations, validation +will have to proceed past the first match to report the 5 matching indexes. +{{}} {{}} diff --git a/content/2020-12/applicator/dependentSchemas.markdown b/content/2020-12/applicator/dependentSchemas.markdown index 81cc600f..1e9a9c8f 100644 --- a/content/2020-12/applicator/dependentSchemas.markdown +++ b/content/2020-12/applicator/dependentSchemas.markdown @@ -20,10 +20,11 @@ related: keyword: dependentRequired --- -The `dependentSchemas` keyword restricts object instances to validate against -one or more of the given subschemas if the corresponding properties are -defined. Note that the given subschemas are evaluated against the object that -defines the property dependency. +The [`dependentSchemas`]({{< ref "2020-12/applicator/dependentSchemas" >}}) keyword +restricts object instances to validate against one or more of the given +subschemas if the corresponding properties are defined. Note that the given +subschemas are evaluated against the object that defines the property +dependency. {{}}The [`dependentRequired`]({{< ref "2020-12/validation/dependentrequired" >}}) keyword is a specialisation of this diff --git a/content/2020-12/applicator/items.markdown b/content/2020-12/applicator/items.markdown index faa783ee..9211d692 100644 --- a/content/2020-12/applicator/items.markdown +++ b/content/2020-12/applicator/items.markdown @@ -41,10 +41,11 @@ related: keyword: unevaluatedItems --- -The `items` keyword restricts array instance items not described by the -_sibling_ [`prefixItems`]({{< ref "2020-12/applicator/prefixitems" >}}) keyword -(if any), to validate against the given subschema. Whether this keyword was -evaluated against any item of the array instance is reported using annotations. +The [`items`]({{< ref "2020-12/applicator/items" >}}) keyword restricts array instance +items not described by the _sibling_ [`prefixItems`]({{< ref +"2020-12/applicator/prefixitems" >}}) keyword (if any), to validate against the +given subschema. Whether this keyword was evaluated against any item of the +array instance is reported using annotations. {{}}This keyword does not prevent an array instance from being empty. If needed, use the [`minItems`]({{< ref "2020-12/validation/minitems" diff --git a/content/2020-12/applicator/patternProperties.markdown b/content/2020-12/applicator/patternProperties.markdown index e5ac4225..677eaf6b 100644 --- a/content/2020-12/applicator/patternProperties.markdown +++ b/content/2020-12/applicator/patternProperties.markdown @@ -1,7 +1,7 @@ --- keyword: "patternProperties" signature: "Object" -value: This keyword must be set to an object where each key is a valid regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema +value: This keyword must be set to an object where each key is a valid regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema summary: "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." kind: [ "applicator", "annotation" ] instance: [ "object" ] @@ -42,10 +42,11 @@ related: keyword: unevaluatedProperties --- -The `patternProperties` keyword restricts properties of an object instance that -match certain regular expressions to match their corresponding subschemas -definitions. Information about the properties that this keyword was evaluated -for is reported using annotations. +The [`patternProperties`]({{< ref "2020-12/applicator/patternProperties" >}}) keyword +restricts properties of an object instance that match certain regular +expressions to match their corresponding subschemas definitions. Information +about the properties that this keyword was evaluated for is reported using +annotations. {{}} This keyword is evaluated independently of the [`properties`]({{< ref "2020-12/applicator/properties" >}}) keyword. If an diff --git a/content/2020-12/applicator/prefixItems.markdown b/content/2020-12/applicator/prefixItems.markdown index 808fa675..6666e753 100644 --- a/content/2020-12/applicator/prefixItems.markdown +++ b/content/2020-12/applicator/prefixItems.markdown @@ -37,16 +37,17 @@ related: keyword: unevaluatedItems --- -The `prefixItems` keyword restricts a number of items from the start of an -array instance to validate against the given sequence of subschemas, where the -item at a given index in the array instance is evaluated against the subschema -at the given index in the `prefixItems` array, if any. Information about the -number of subschemas that were evaluated against the array instance is reported -using annotations. - -Array items outside the range described by the `prefixItems` keyword is -evaluated against the [`items`]({{< ref "2020-12/applicator/items" >}}) -keyword, if present. +The [`prefixItems`]({{< ref "2020-12/applicator/prefixItems" >}}) keyword restricts a +number of items from the start of an array instance to validate against the +given sequence of subschemas, where the item at a given index in the array +instance is evaluated against the subschema at the given index in the +[`prefixItems`]({{< ref "2020-12/applicator/prefixItems" >}}) array, if any. Information +about the number of subschemas that were evaluated against the array instance +is reported using annotations. + +Array items outside the range described by the +[`prefixItems`]({{< ref "2020-12/applicator/prefixItems" >}}) keyword is evaluated against +the [`items`]({{< ref "2020-12/applicator/items" >}}) keyword, if present. {{}}This keyword does not restrict the size of the array. If the array instance has fewer number of items that the given subschemas, only diff --git a/content/2020-12/applicator/properties.markdown b/content/2020-12/applicator/properties.markdown index 2e0696e8..1c782563 100644 --- a/content/2020-12/applicator/properties.markdown +++ b/content/2020-12/applicator/properties.markdown @@ -40,10 +40,10 @@ related: keyword: unevaluatedProperties --- -The `properties` keyword restricts properties of an object instance, when -present, to match their corresponding subschemas definitions. Information about -the properties that this keyword was evaluated for is reported using -annotations. +The [`properties`]({{< ref "2020-12/applicator/properties" >}}) keyword restricts +properties of an object instance, when present, to match their corresponding +subschemas definitions. Information about the properties that this keyword was +evaluated for is reported using annotations. {{}}The use of this keyword **does not prevent the presence of other properties** in the object instance and **does not enforce the presence diff --git a/content/2020-12/applicator/propertyNames.markdown b/content/2020-12/applicator/propertyNames.markdown index 6a0bbef8..00b73fb1 100644 --- a/content/2020-12/applicator/propertyNames.markdown +++ b/content/2020-12/applicator/propertyNames.markdown @@ -32,13 +32,13 @@ related: keyword: unevaluatedProperties --- -The `propertyNames` keyword restricts object instances to only define -properties whose names match the given schema. This keyword is evaluated -against _every_ property of the object instance, independently of keywords that -indirectly introduce property names such as [`properties`]({{< ref -"2020-12/applicator/properties" >}}) and [`patternProperties`]({{< ref -"2020-12/applicator/patternproperties" >}}). Annotations coming from inside -this keyword are dropped. +The [`propertyNames`]({{< ref "2020-12/applicator/propertyNames" >}}) keyword restricts +object instances to only define properties whose names match the given schema. +This keyword is evaluated against _every_ property of the object instance, +independently of keywords that indirectly introduce property names such as +[`properties`]({{< ref "2020-12/applicator/properties" >}}) and +[`patternProperties`]({{< ref "2020-12/applicator/patternproperties" >}}). +Annotations coming from inside this keyword are dropped. {{}} As per the JSON grammar, the name of an object property must be a string. Therefore, setting this keyword to a schema that makes use of @@ -86,7 +86,7 @@ the object by setting the [`additionalProperties`]({{< ref "Hello World" {{}} -{{}} +{{}} { "$schema": "https://json-schema.org/draft/2020-12/schema", "propertyNames": { "type": "array" } diff --git a/content/2020-12/content/contentEncoding.markdown b/content/2020-12/content/contentEncoding.markdown index 8b7ea61d..3fae534c 100644 --- a/content/2020-12/content/contentEncoding.markdown +++ b/content/2020-12/content/contentEncoding.markdown @@ -20,12 +20,13 @@ related: keyword: contentSchema --- -The `contentEncoding` keyword signifies that a string instance value (such as a -specific object property) should be considered binary data serialised using the -given encoding. This keyword does not affect validation, but the evaluator will -collect its value as an annotation. The use of this and related keywords is a -common technique to encode and describe arbitrary binary data (such as image, -audio, and video) in JSON. +The [`contentEncoding`]({{< ref "2020-12/content/contentEncoding" >}}) keyword signifies +that a string instance value (such as a specific object property) should be +considered binary data serialised using the given encoding. This keyword does +not affect validation, but the evaluator will collect its value as an +annotation. The use of this and related keywords is a common technique to +encode and describe arbitrary binary data (such as image, audio, and video) in +JSON. {{}} diff --git a/content/2020-12/content/contentMediaType.markdown b/content/2020-12/content/contentMediaType.markdown index 0fd0c073..c1d6ba87 100644 --- a/content/2020-12/content/contentMediaType.markdown +++ b/content/2020-12/content/contentMediaType.markdown @@ -22,7 +22,7 @@ related: --- When the [`contentEncoding`]({{< ref "2020-12/content/contentencoding" >}}) -keyword is set, the `contentMediaType` keyword signifies that a string instance +keyword is set, the [`contentMediaType`]({{< ref "2020-12/content/contentMediaType" >}}) keyword signifies that a string instance value (such as a specific object property) should be considered binary data that represents the given type. This keyword does not affect validation, but the evaluator will collect its value as an annotation. The use of this and diff --git a/content/2020-12/content/contentSchema.markdown b/content/2020-12/content/contentSchema.markdown index 832902c0..0371f004 100644 --- a/content/2020-12/content/contentSchema.markdown +++ b/content/2020-12/content/contentSchema.markdown @@ -26,7 +26,7 @@ related: When the [`contentMediaType`]({{< ref "2020-12/content/contentmediatype" >}}) keyword is set to a media type that adheres to the JSON data model (like JSON itself, [YAML](https://yaml.org) or [UBJSON](https://ubjson.org)), the -`contentSchema` keyword declares the schema that describes the corresponding +[`contentSchema`]({{< ref "2020-12/content/contentSchema" >}}) keyword declares the schema that describes the corresponding string instance value _after_ decoding it. This keyword does not affect validation, but the evaluator will collect its value as an annotation. diff --git a/content/2020-12/core/anchor.markdown b/content/2020-12/core/anchor.markdown index 48593063..678169fb 100644 --- a/content/2020-12/core/anchor.markdown +++ b/content/2020-12/core/anchor.markdown @@ -22,12 +22,12 @@ related: keyword: $dynamicAnchor --- -The `$anchor` keyword associates a subschema with the given URI fragment -identifier, which can be referenced using the [`$ref`]({{< ref -"2020-12/core/ref" >}}) keyword. The fragment identifier is resolved against -the URI of the schema resource. Therefore, using this keyword to declare the -same anchor more than once within the same schema resource results in an -invalid schema. +The [`$anchor`]({{< ref "2020-12/core/anchor" >}}) keyword associates a subschema with the +given URI fragment identifier, which can be referenced using the [`$ref`]({{< +ref "2020-12/core/ref" >}}) keyword. The fragment identifier is resolved +against the URI of the schema resource. Therefore, using this keyword to +declare the same anchor more than once within the same schema resource results +in an invalid schema. {{}} diff --git a/content/2020-12/core/comment.markdown b/content/2020-12/core/comment.markdown index 846f7299..26f487b6 100644 --- a/content/2020-12/core/comment.markdown +++ b/content/2020-12/core/comment.markdown @@ -11,11 +11,11 @@ introduced_in: draft7 index: -9 --- -The `$comment` keyword is a standardised placeholder for explanatory string -schema comments. This keyword is completely ignored by the evaluation process -and it is possible to strip instances of this keyword when distributing your -schemas for the purpose of space-efficiency. This keyword is commonly used to -declare [TODO +The [`$comment`]({{< ref "2020-12/core/comment" >}}) keyword is a standardised placeholder +for explanatory string schema comments. This keyword is completely ignored by +the evaluation process and it is possible to strip instances of this keyword +when distributing your schemas for the purpose of space-efficiency. This +keyword is commonly used to declare [TODO comments](https://en.wikipedia.org/wiki/Comment_%28computer_programming%29#Tags) in various parts of a schema. diff --git a/content/2020-12/core/defs.markdown b/content/2020-12/core/defs.markdown index 4203fda7..ef1548e9 100644 --- a/content/2020-12/core/defs.markdown +++ b/content/2020-12/core/defs.markdown @@ -2,7 +2,7 @@ keyword: "$defs" signature: "Object" value: This keyword must be set to an object where each value is a valid JSON Schema -summary: "This keyword reserves a location for schema authors to inline re-usable JSON Schemas into a more general schema." +summary: "This keyword reserves a location for schema authors to inline reusable JSON Schemas into a more general schema." kind: [ "location" ] instance: [ "any" ] specification: "https://json-schema.org/draft/2020-12/json-schema-core.html#section-8.2.4" @@ -20,11 +20,12 @@ related: keyword: $dynamicRef --- -The `$defs` keyword is a container for storing re-usable schemas within a -schema resource, which can be referenced using the [`$ref`]({{< ref -"2020-12/core/ref" >}}) or [`$dynamicRef`]({{< ref "2020-12/core/dynamicref" ->}}) keywords. From a software engineering point of view, this keyword is -analogous to defining _internal_ helper functions as part of a larger program. +The [`$defs`]({{< ref "2020-12/core/defs" >}}) keyword is a container for storing reusable +schemas within a schema resource, which can be referenced using the +[`$ref`]({{< ref "2020-12/core/ref" >}}) or [`$dynamicRef`]({{< ref +"2020-12/core/dynamicref" >}}) keywords. From a software engineering point of +view, this keyword is analogous to defining _internal_ helper functions as part +of a larger program. {{}} diff --git a/content/2020-12/core/dynamicAnchor.markdown b/content/2020-12/core/dynamicAnchor.markdown index f56ea673..c939ac03 100644 --- a/content/2020-12/core/dynamicAnchor.markdown +++ b/content/2020-12/core/dynamicAnchor.markdown @@ -29,7 +29,7 @@ also records this association in the [dynamic scope](https://json-schema.org/blog/posts/dynamicref-and-generics). When resolving a dynamic anchor using the [`$dynamicRef`]({{< ref "2020-12/core/dynamicref" >}}) keyword, the base URI of the origin is not -considered. Instead, evaluation jumps to the first encountered occurence of the +considered. Instead, evaluation jumps to the first encountered occurrence of the given dynamic anchor in the [stack of schema resources](https://json-schema.org/blog/posts/understanding-lexical-dynamic-scopes#the-dynamic-scope-as-a-stack) traversed so far. @@ -104,7 +104,7 @@ $ jsonschema validate string-list.json instance.json --resolve generic-list.json ## Examples -{{}} +{{}} { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/generic-list", diff --git a/content/2020-12/core/dynamicRef.markdown b/content/2020-12/core/dynamicRef.markdown index 3787a85a..5b691267 100644 --- a/content/2020-12/core/dynamicRef.markdown +++ b/content/2020-12/core/dynamicRef.markdown @@ -31,7 +31,7 @@ a schema to reference another schema by its dynamic anchor, as declared by the resolving a dynamic anchor using this keyword, the base URI of the origin is not considered. Instead, the evaluator looks in the [dynamic scope](https://json-schema.org/blog/posts/dynamicref-and-generics) and jumps to -the first encountered occurence of the given dynamic anchor in the [stack of +the first encountered occurrence of the given dynamic anchor in the [stack of schema resources](https://json-schema.org/blog/posts/understanding-lexical-dynamic-scopes#the-dynamic-scope-as-a-stack) traversed so far. @@ -40,7 +40,7 @@ In other words, **think of a schema declaring a dynamic reference as a reference that considers that its destination might have been re-defined by a parent schema**. For example, a schema that dynamically references an anchor `foo` says: _"jump to the location set by the `foo` anchor, but if there are -overriden variants of it, jump to the first of those instead"_. +overridden variants of it, jump to the first of those instead"_. {{}} @@ -110,7 +110,7 @@ $ jsonschema validate string-list.json instance.json --resolve generic-list.json ## Examples -{{}} +{{}} { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/generic-list", diff --git a/content/2020-12/core/id.markdown b/content/2020-12/core/id.markdown index 4991dda7..5999910f 100644 --- a/content/2020-12/core/id.markdown +++ b/content/2020-12/core/id.markdown @@ -29,12 +29,13 @@ related: keyword: $vocabulary --- -The `$id` keyword explicitly turns a schema into a _schema resource_ (a schema -that is associated with a URI). Relative URIs are resolved against the -_current_ base URI, which is either the closest parent `$id` keyword -(applicable in the case of compound schemas), or the base URI as determined by -the context on which the schema is declared (i.e. serving a schema over HTTP -_may_ implicitly award it such URL as the base). +The [`$id`]({{< ref "2020-12/core/id" >}}) keyword explicitly turns a schema into a _schema +resource_ (a schema that is associated with a URI). Relative URIs are resolved +against the _current_ base URI, which is either the closest parent +[`$id`]({{< ref "2020-12/core/id" >}}) keyword (applicable in the case of compound schemas), +or the base URI as determined by the context on which the schema is declared +(i.e. serving a schema over HTTP _may_ implicitly award it such URL as the +base). Note that you cannot set this keyword to a URI that contains a fragment identifier. Instead, fragment identifiers must be set with the [`$anchor`]({{< @@ -84,8 +85,8 @@ or a non-locatable URI scheme such as a [Tag URI](https://www.taguri.org). {{}} -To debug the role of the `$id` keyword on a schema (particularly schemas -with embedded resources), try the [`jsonschema +To debug the role of the [`$id`]({{< ref "2020-12/core/id" >}}) keyword on a schema +(particularly schemas with embedded resources), try the [`jsonschema inspect`](https://github.com/sourcemeta/jsonschema/blob/main/docs/inspect.markdown) command. This command prints detailed information about each schema resource, subschema, location, and reference present in the schema. For example: diff --git a/content/2020-12/core/ref.markdown b/content/2020-12/core/ref.markdown index 4da01c35..5497d241 100644 --- a/content/2020-12/core/ref.markdown +++ b/content/2020-12/core/ref.markdown @@ -32,7 +32,7 @@ related: keyword: $defs --- -The `$ref` keyword enables a schema to reference another schema by its URI, +The [`$ref`]({{< ref "2020-12/core/ref" >}}) keyword enables a schema to reference another schema by its URI, effectively importing its keywords into the current evaluation process. This keyword is the cornerstone of schema composition, allowing complex schemas to be created out of simpler ones. A reference may set its URI fragment to a [JSON diff --git a/content/2020-12/core/schema.markdown b/content/2020-12/core/schema.markdown index 09723082..01cdb51a 100644 --- a/content/2020-12/core/schema.markdown +++ b/content/2020-12/core/schema.markdown @@ -20,17 +20,17 @@ related: keyword: $defs --- -The `$schema` keyword serves to explicitly associate a _schema resource_ with -the JSON Schema dialect that defines it, where the dialect is the identifier of -a meta-schema that defines the vocabularies in use and imposes syntactic -constraints on its schema instances. If the `$schema` keyword is not declared, -the schema inherits its context-specific or implementation-specific default -dialect. - -{{}} It is common to avoid the `$schema` keyword when working -with [OpenAPI](https://www.openapis.org). This is possible because the OpenAPI -specification clearly documents what the default JSON Schema dialect is for -every version. For example, [OpenAPI +The [`$schema`]({{< ref "2020-12/core/schema" >}}) keyword serves to explicitly associate a +_schema resource_ with the JSON Schema dialect that defines it, where the +dialect is the identifier of a meta-schema that defines the vocabularies in use +and imposes syntactic constraints on its schema instances. If the +[`$schema`]({{< ref "2020-12/core/schema" >}}) keyword is not declared, the schema inherits +its context-specific or implementation-specific default dialect. + +{{}} It is common to avoid the [`$schema`]({{< ref "2020-12/core/schema" >}}) +keyword when working with [OpenAPI](https://www.openapis.org). This is possible +because the OpenAPI specification clearly documents what the default JSON +Schema dialect is for every version. For example, [OpenAPI v3.1.1](https://spec.openapis.org/oas/latest.html#json-schema-keywords) defines the default dialect as `https://spec.openapis.org/oas/3.1/dialect/base`. {{}} @@ -39,13 +39,14 @@ Strictly-compliant JSON Schema implementations will refuse to process a schema whose dialect cannot be unambiguously determined. {{}} To avoid undefined behavior, it is generally recommended to -always explicitly set the dialect of a schema using the `$schema` keyword. This -ensures that less strict implementations unambiguously know how to process the -schema and don't attempt to guess.{{}} - -Note that the `$schema` keyword can occur multiple times in the same schema, -and not only at the top-level. This is often the case when performing [JSON -Schema +always explicitly set the dialect of a schema using the +[`$schema`]({{< ref "2020-12/core/schema" >}}) keyword. This ensures that less strict +implementations unambiguously know how to process the schema and don't attempt +to guess.{{}} + +Note that the [`$schema`]({{< ref "2020-12/core/schema" >}}) keyword can occur multiple +times in the same schema, and not only at the top-level. This is often the case +when performing [JSON Schema Bundling](https://github.com/sourcemeta/jsonschema/blob/main/docs/bundle.markdown) to inline externally referenced schemas that might be based on different dialects of JSON Schema. @@ -56,8 +57,8 @@ meta-schema is necessary for correctly determining the base URI of the schema, from which a relative meta-schema reference would be resolved, introducing a circular problem. -A common occurrence of this issue is setting the `$schema` keyword to a -relative path, which is again invalid according to the +A common occurrence of this issue is setting the [`$schema`]({{< ref "2020-12/core/schema" >}}) +keyword to a relative path, which is again invalid according to the specification.{{}} {{}}JSON Schema prohibits the use of the this keyword on @@ -76,8 +77,8 @@ command. For example: $ jsonschema metaschema my-schema.json ``` -To debug the role of the `$schema` keyword on a schema (particularly schemas -with embedded resources), try the [`jsonschema +To debug the role of the [`$schema`]({{< ref "2020-12/core/schema" >}}) keyword on a schema +(particularly schemas with embedded resources), try the [`jsonschema inspect`](https://github.com/sourcemeta/jsonschema/blob/main/docs/inspect.markdown) command. This command prints detailed information about each schema resource, subschema, location, and reference present in the schema. For example: diff --git a/content/2020-12/core/vocabulary.markdown b/content/2020-12/core/vocabulary.markdown index 0b892362..05fa91db 100644 --- a/content/2020-12/core/vocabulary.markdown +++ b/content/2020-12/core/vocabulary.markdown @@ -19,15 +19,15 @@ related: keyword: $schema --- -The `$vocabulary` keyword is a _mandatory_ component of a dialect meta-schema +The [`$vocabulary`]({{< ref "2020-12/core/vocabulary" >}}) keyword is a _mandatory_ component of a dialect meta-schema to list the required and optional vocabularies available for use by the schema instances of such dialect. The vocabularies declared by a dialect meta-schema are not inherited by meta-schemas that derive from it. Each dialect meta-schema -must explicitly state the vocabularies it imports using the `$vocabulary` +must explicitly state the vocabularies it imports using the [`$vocabulary`]({{< ref "2020-12/core/vocabulary" >}}) keyword. -{{}}Declaring the `$vocabulary` keyword in a schema does not -grant that same schema access to such vocabularies. Instead, the `$vocabulary` +{{}}Declaring the [`$vocabulary`]({{< ref "2020-12/core/vocabulary" >}}) keyword in a schema does not +grant that same schema access to such vocabularies. Instead, the [`$vocabulary`]({{< ref "2020-12/core/vocabulary" >}}) keyword must be set in the dialect meta-schema that describes the desired schema.{{}} diff --git a/content/2020-12/format-annotation/format.markdown b/content/2020-12/format-annotation/format.markdown index 0d773a86..d9de7364 100644 --- a/content/2020-12/format-annotation/format.markdown +++ b/content/2020-12/format-annotation/format.markdown @@ -1,7 +1,7 @@ --- keyword: "format" signature: "String" -value: This keyword must be set to a string, preferrably one that is standardized by JSON Schema to ensure interoperability +value: This keyword must be set to a string, preferably one that is standardized by JSON Schema to ensure interoperability summary: "Define semantic information about a string instance." kind: [ "annotation" ] instance: [ "string" ] @@ -24,7 +24,7 @@ related: keyword: format --- -The `format` keyword communicates that string instances are of the given +The [`format`]({{< ref "2020-12/format-annotation/format" >}}) keyword communicates that string instances are of the given logical type by producing an annotation value. {{}} By default, this keyword does not perform validation. If diff --git a/content/2020-12/format-assertion/format.markdown b/content/2020-12/format-assertion/format.markdown index 99ca78a6..249a8562 100644 --- a/content/2020-12/format-assertion/format.markdown +++ b/content/2020-12/format-assertion/format.markdown @@ -1,7 +1,7 @@ --- keyword: "format" signature: "String" -value: This keyword must be set to a string, preferrably one that is standardized by JSON Schema to ensure interoperability +value: This keyword must be set to a string, preferably one that is standardized by JSON Schema to ensure interoperability summary: "Define and assert semantic information about a string instance." kind: [ "annotation", "assertion" ] instance: [ "string" ] @@ -44,7 +44,7 @@ related: keyword: format --- -The `format` keyword restricts string instances to the given logical type and +The [`format`]({{< ref "2020-12/format-annotation/format" >}}) keyword restricts string instances to the given logical type and produces an annotation value. However, this vocabulary is not used by default in the JSON Schema 2020-12 diff --git a/content/2020-12/meta-data/default.markdown b/content/2020-12/meta-data/default.markdown index f0cc92c5..5512cfa0 100644 --- a/content/2020-12/meta-data/default.markdown +++ b/content/2020-12/meta-data/default.markdown @@ -1,7 +1,7 @@ --- keyword: "default" signature: "Any" -value: This keyword must be set to a JSON value, preferrably that successfully validates against the corresponding subschema +value: This keyword must be set to a JSON value, preferably that successfully validates against the corresponding subschema summary: "This keyword can be used to supply a default JSON value associated with a particular schema." kind: [ "annotation" ] instance: [ "any" ] @@ -28,7 +28,7 @@ related: keyword: deprecated --- -The `default` keyword declares a default instance value for a schema or any of +The [`default`]({{< ref "2020-12/meta-data/default" >}}) keyword declares a default instance value for a schema or any of its subschemas, typically to support specialised tooling like documentation and form generators. This keyword does not affect validation, but the evaluator will collect its value as an annotation. @@ -62,7 +62,7 @@ including this one. {{}} You might be tempted to evaluate a schema against an instance and rely on -`default` annotations to feed back the missing values back to it. However, +[`default`]({{< ref "2020-12/meta-data/default" >}}) annotations to feed back the missing values back to it. However, there is a known limitation that prevents this approach: in JSON Schema, annotations are collected when a subschema is evaluated, which means that the default value annotation is only emitted when the corresponding instance diff --git a/content/2020-12/meta-data/deprecated.markdown b/content/2020-12/meta-data/deprecated.markdown index 7cf8d5d1..a9d4d314 100644 --- a/content/2020-12/meta-data/deprecated.markdown +++ b/content/2020-12/meta-data/deprecated.markdown @@ -28,7 +28,7 @@ related: keyword: writeOnly --- -The `deprecated` keyword, when set to `true`, signifies that an instance value +The [`deprecated`]({{< ref "2020-12/meta-data/deprecated" >}}) keyword, when set to `true`, signifies that an instance value (such as a specific object property) should not be used and may be removed or rejected in the future. This keyword does not affect validation, but the evaluator will collect its value as an annotation. @@ -45,7 +45,7 @@ an annotation that does not carry any additional meaning. {{}} Tooling makers must be careful when statically traversing schemas in search of -occurences of this keyword. It is possible for schemas to make use of this +occurrences of this keyword. It is possible for schemas to make use of this keyword behind conditional operators, references, or any other type of keyword that makes it hard or even impossible to correctly locate these values without fully evaluating the schema against an instance. The only bullet proof method diff --git a/content/2020-12/meta-data/description.markdown b/content/2020-12/meta-data/description.markdown index 8a20d8cc..1d72e7cc 100644 --- a/content/2020-12/meta-data/description.markdown +++ b/content/2020-12/meta-data/description.markdown @@ -27,7 +27,7 @@ related: keyword: deprecated --- -The `description` keyword is a placeholder for a longer human-readable string +The [`description`]({{< ref "2020-12/meta-data/description" >}}) keyword is a placeholder for a longer human-readable string summary of what a schema or any of its subschemas are about. This keyword does not affect validation, but the evaluator will collect its value as an annotation. @@ -46,7 +46,7 @@ concise summary altogether. {{}} Tooling makers must be careful when statically traversing schemas in search of -occurences of this keyword. It is possible for schemas to make use of this +occurrences of this keyword. It is possible for schemas to make use of this keyword behind conditional operators, references, or any other type of keyword that makes it hard or even impossible to correctly locate these values without fully evaluating the schema against an instance. The only bullet proof method diff --git a/content/2020-12/meta-data/examples.markdown b/content/2020-12/meta-data/examples.markdown index 14ab7822..d3a188d3 100644 --- a/content/2020-12/meta-data/examples.markdown +++ b/content/2020-12/meta-data/examples.markdown @@ -1,7 +1,7 @@ --- keyword: "examples" signature: "Array" -value: This keyword must be set to an array of JSON values that preferrably successfully validates against the corresponding subschema +value: This keyword must be set to an array of JSON values that preferably successfully validates against the corresponding subschema summary: "This keyword is used to provide sample JSON values associated with a particular schema, for the purpose of illustrating usage." kind: [ "annotation" ] instance: [ "any" ] @@ -31,7 +31,7 @@ related: --- -The `examples` keyword declares a set of example instances for a schema or any +The [`examples`]({{< ref "2020-12/meta-data/examples" >}}) keyword declares a set of example instances for a schema or any of its subschemas, typically for documentation purposes. This keyword does not affect validation, but the evaluator will collect its set of values as an annotation. diff --git a/content/2020-12/meta-data/readOnly.markdown b/content/2020-12/meta-data/readOnly.markdown index d8e6ca40..291f00a0 100644 --- a/content/2020-12/meta-data/readOnly.markdown +++ b/content/2020-12/meta-data/readOnly.markdown @@ -28,7 +28,7 @@ related: keyword: deprecated --- -The `readOnly` keyword, when set to `true`, signifies that an instance value +The [`readOnly`]({{< ref "2020-12/meta-data/readOnly" >}}) keyword, when set to `true`, signifies that an instance value (such as a specific object property) cannot be modified or removed, whatever that means in the context of the system. For example, form generators may rely on this keyword to mark the corresponding input as read only. This keyword does @@ -51,7 +51,7 @@ location, resulting in ambiguous semantics. {{}} Tooling makers must be careful when statically traversing schemas in search of -occurences of this keyword. It is possible for schemas to make use of this +occurrences of this keyword. It is possible for schemas to make use of this keyword behind conditional operators, references, or any other type of keyword that makes it hard or even impossible to correctly locate these values without fully evaluating the schema against an instance. The only bullet proof method diff --git a/content/2020-12/meta-data/title.markdown b/content/2020-12/meta-data/title.markdown index 70bd7c4b..ac051471 100644 --- a/content/2020-12/meta-data/title.markdown +++ b/content/2020-12/meta-data/title.markdown @@ -27,7 +27,7 @@ related: keyword: deprecated --- -The `title` keyword is a placeholder for a concise human-readable string +The [`title`]({{< ref "2020-12/meta-data/title" >}}) keyword is a placeholder for a concise human-readable string summary of what a schema or any of its subschemas are about. This keyword does not affect validation, but the evaluator will collect its value as an annotation. @@ -50,7 +50,7 @@ you run out of space, you can move the additional information to the {{}} Tooling makers must be careful when statically traversing schemas in search of -occurences of this keyword. It is possible for schemas to make use of this +occurrences of this keyword. It is possible for schemas to make use of this keyword behind conditional operators, references, or any other type of keyword that makes it hard or even impossible to correctly locate these values without fully evaluating the schema against an instance. The only bullet proof method diff --git a/content/2020-12/meta-data/writeOnly.markdown b/content/2020-12/meta-data/writeOnly.markdown index 4337e747..9dc86b12 100644 --- a/content/2020-12/meta-data/writeOnly.markdown +++ b/content/2020-12/meta-data/writeOnly.markdown @@ -28,7 +28,7 @@ related: keyword: deprecated --- -The `writeOnly` keyword, when set to `true`, signifies that an instance value +The [`writeOnly`]({{< ref "2020-12/meta-data/writeOnly" >}}) keyword, when set to `true`, signifies that an instance value (such as a specific object property) can be modified or removed but not read, whatever that means in the context of the system. For example, form generators may rely on this keyword to mark the corresponding input as as a password @@ -51,7 +51,7 @@ location, resulting in ambiguous semantics. {{}} Tooling makers must be careful when statically traversing schemas in search of -occurences of this keyword. It is possible for schemas to make use of this +occurrences of this keyword. It is possible for schemas to make use of this keyword behind conditional operators, references, or any other type of keyword that makes it hard or even impossible to correctly locate these values without fully evaluating the schema against an instance. The only bullet proof method diff --git a/content/2020-12/unevaluated/unevaluatedItems.markdown b/content/2020-12/unevaluated/unevaluatedItems.markdown index 5e070538..561c1e7d 100644 --- a/content/2020-12/unevaluated/unevaluatedItems.markdown +++ b/content/2020-12/unevaluated/unevaluatedItems.markdown @@ -31,7 +31,7 @@ The [`unevaluatedItems`]({{< ref "2020-12/unevaluated/unevaluateditems" >}}) keyword is a generalisation of the [`items`]({{< ref "2020-12/applicator/items" >}}) keyword that considers related keywords even when they are not direct siblings of this keyword. More specifically, this keyword is affected by -occurences of [`prefixItems`]({{< ref "2020-12/applicator/prefixitems" >}}), +occurrences of [`prefixItems`]({{< ref "2020-12/applicator/prefixitems" >}}), [`items`]({{< ref "2020-12/applicator/items" >}}), [`contains`]({{< ref "2020-12/applicator/contains" >}}), and [`unevaluatedItems`]({{< ref "2020-12/unevaluated/unevaluateditems" @@ -50,7 +50,7 @@ There are two common use cases for this keyword, both for reducing duplication: [`contains`]({{< ref "2020-12/applicator/contains" >}}) keywords behind conditional logic without duplicating the [`items`]({{< ref "2020-12/applicator/items" ->}}) keyword in every possible branch. (2) Re-using +>}}) keyword in every possible branch. (2) Reusing helpers that consist of the [`prefixItems`]({{< ref "2020-12/applicator/prefixitems" >}}), [`items`]({{< ref "2020-12/applicator/items" >}}), or [`contains`]({{< ref diff --git a/content/2020-12/unevaluated/unevaluatedProperties.markdown b/content/2020-12/unevaluated/unevaluatedProperties.markdown index 8fc96432..eff27abd 100644 --- a/content/2020-12/unevaluated/unevaluatedProperties.markdown +++ b/content/2020-12/unevaluated/unevaluatedProperties.markdown @@ -32,7 +32,7 @@ The [`unevaluatedProperties`]({{< ref the [`additionalProperties`]({{< ref "2020-12/applicator/additionalproperties" >}}) keyword that considers related keywords even when they are not direct siblings of this keyword. More specifically, this keyword is affected by -occurences of [`properties`]({{< ref "2020-12/applicator/properties" >}}), +occurrences of [`properties`]({{< ref "2020-12/applicator/properties" >}}), [`patternProperties`]({{< ref "2020-12/applicator/patternproperties" >}}), [`additionalProperties`]({{< ref "2020-12/applicator/additionalproperties" >}}), and [`unevaluatedProperties`]({{< ref @@ -52,7 +52,7 @@ There are two common use cases for this keyword, both for reducing duplication: [`patternProperties`]({{< ref "2020-12/applicator/patternproperties" >}}) keywords behind conditional logic without duplicating the [`additionalProperties`]({{< ref "2020-12/applicator/additionalproperties" ->}}) keyword in every possible branch. (2) Re-using +>}}) keyword in every possible branch. (2) Reusing helpers that consist of the [`properties`]({{< ref "2020-12/applicator/properties" >}}), [`patternProperties`]({{< ref "2020-12/applicator/patternproperties" >}}), or [`additionalProperties`]({{< diff --git a/content/2020-12/validation/const.markdown b/content/2020-12/validation/const.markdown index 307a46ec..e4c791a2 100644 --- a/content/2020-12/validation/const.markdown +++ b/content/2020-12/validation/const.markdown @@ -18,7 +18,7 @@ related: keyword: type --- -The `const` keyword (short for "constant") restricts instances to a single +The [`const`]({{< ref "2020-12/validation/const" >}}) keyword (short for "constant") restricts instances to a single specific JSON value of any type. {{}} Constraining instances to a constant value by definition @@ -29,7 +29,7 @@ anti-pattern.{{}} {{}} There are programming languages, such as JavaScript, that [cannot distinguish between integers and real -numbers](https://2ality.com/2012/04/number-encoding.html). To accomodate for +numbers](https://2ality.com/2012/04/number-encoding.html). To accommodate for those cases, JSON Schema considers a real number with a zero fractional part to be equal to the corresponding integer. For example, in JSON Schema, `1` is considered to be equal to `1.0`.{{}} diff --git a/content/2020-12/validation/dependentRequired.markdown b/content/2020-12/validation/dependentRequired.markdown index a1d809bc..58d629d7 100644 --- a/content/2020-12/validation/dependentRequired.markdown +++ b/content/2020-12/validation/dependentRequired.markdown @@ -26,7 +26,7 @@ related: keyword: else --- -The `dependentRequired` keyword restricts object instances to define certain +The [`dependentRequired`]({{< ref "2020-12/validation/dependentRequired" >}}) keyword restricts object instances to define certain properties if other properties are also defined. {{}} Note that multiple potentially interrelated dependencies diff --git a/content/2020-12/validation/enum.markdown b/content/2020-12/validation/enum.markdown index 057b7dea..99f9b183 100644 --- a/content/2020-12/validation/enum.markdown +++ b/content/2020-12/validation/enum.markdown @@ -24,7 +24,7 @@ related: keyword: oneOf --- -The `enum` keyword restricts instances to a finite set of possible values, +The [`enum`]({{< ref "2020-12/validation/enum" >}}) keyword restricts instances to a finite set of possible values, which may be of different types. {{}} Constraining instances to a set of possible values by @@ -35,7 +35,7 @@ anti-pattern.{{}} {{}} There are programming languages, such as JavaScript, that [cannot distinguish between integers and real -numbers](https://2ality.com/2012/04/number-encoding.html). To accomodate for +numbers](https://2ality.com/2012/04/number-encoding.html). To accommodate for those cases, JSON Schema considers a real number with a zero fractional part to be equal to the corresponding integer. For example, in JSON Schema, `1` is considered to be equal to `1.0`.{{}} diff --git a/content/2020-12/validation/exclusiveMaximum.markdown b/content/2020-12/validation/exclusiveMaximum.markdown index 4a7f762c..035d3345 100644 --- a/content/2020-12/validation/exclusiveMaximum.markdown +++ b/content/2020-12/validation/exclusiveMaximum.markdown @@ -24,7 +24,7 @@ related: keyword: multipleOf --- -The `exclusiveMaximum` keyword restricts number instances to be strictly less +The [`exclusiveMaximum`]({{< ref "2020-12/validation/exclusiveMaximum" >}}) keyword restricts number instances to be strictly less than the given number. {{}} diff --git a/content/2020-12/validation/exclusiveMinimum.markdown b/content/2020-12/validation/exclusiveMinimum.markdown index a4705292..53cff941 100644 --- a/content/2020-12/validation/exclusiveMinimum.markdown +++ b/content/2020-12/validation/exclusiveMinimum.markdown @@ -24,7 +24,7 @@ related: keyword: multipleOf --- -The `exclusiveMinimum` keyword restricts number instances to be strictly +The [`exclusiveMinimum`]({{< ref "2020-12/validation/exclusiveMinimum" >}}) keyword restricts number instances to be strictly greater than the given number. {{}} diff --git a/content/2020-12/validation/maxContains.markdown b/content/2020-12/validation/maxContains.markdown index def143b1..df6154d9 100644 --- a/content/2020-12/validation/maxContains.markdown +++ b/content/2020-12/validation/maxContains.markdown @@ -22,7 +22,7 @@ related: keyword: items --- -The `maxContains` keyword modifies the [`contains`]({{< ref +The [`maxContains`]({{< ref "2020-12/validation/maxContains" >}}) keyword modifies the [`contains`]({{< ref "2020-12/applicator/contains" >}}) keyword to constrain array instances to the given maximum number of containment matches. This keyword has no effect if the [`contains`]({{< ref "2020-12/applicator/contains" >}}) keyword is not diff --git a/content/2020-12/validation/maxItems.markdown b/content/2020-12/validation/maxItems.markdown index 8176889d..4ec9b994 100644 --- a/content/2020-12/validation/maxItems.markdown +++ b/content/2020-12/validation/maxItems.markdown @@ -22,7 +22,7 @@ related: keyword: contains --- -The `maxItems` keyword restricts array instances to consists of an inclusive +The [`maxItems`]({{< ref "2020-12/validation/maxItems" >}}) keyword restricts array instances to consists of an inclusive maximum numbers of items. {{}} The presence of this keyword does not depend on the diff --git a/content/2020-12/validation/maxLength.markdown b/content/2020-12/validation/maxLength.markdown index a762a9fd..b9250537 100644 --- a/content/2020-12/validation/maxLength.markdown +++ b/content/2020-12/validation/maxLength.markdown @@ -20,7 +20,7 @@ related: keyword: format --- -The `maxLength` keyword restricts string instances to consists of an inclusive +The [`maxLength`]({{< ref "2020-12/validation/maxLength" >}}) keyword restricts string instances to consists of an inclusive maximum number of [Unicode](https://unicode.org) code-points (logical characters), which is not necessarily the same as the number of bytes in the string. diff --git a/content/2020-12/validation/maxProperties.markdown b/content/2020-12/validation/maxProperties.markdown index befb7d06..22c2bc66 100644 --- a/content/2020-12/validation/maxProperties.markdown +++ b/content/2020-12/validation/maxProperties.markdown @@ -22,7 +22,7 @@ related: keyword: additionalProperties --- -The `maxProperties` keyword restricts object instances to consists of an +The [`maxProperties`]({{< ref "2020-12/validation/maxProperties" >}}) keyword restricts object instances to consists of an inclusive maximum numbers of properties. {{}} The presence of this keyword does not depend on the diff --git a/content/2020-12/validation/maximum.markdown b/content/2020-12/validation/maximum.markdown index aedbb94f..538da579 100644 --- a/content/2020-12/validation/maximum.markdown +++ b/content/2020-12/validation/maximum.markdown @@ -22,7 +22,7 @@ related: keyword: multipleOf --- -The `maximum` keyword restricts number instances to be less than or equal to +The [`maximum`]({{< ref "2020-12/validation/maximum" >}}) keyword restricts number instances to be less than or equal to the given number. {{}} diff --git a/content/2020-12/validation/minContains.markdown b/content/2020-12/validation/minContains.markdown index 8fa96159..2a87f127 100644 --- a/content/2020-12/validation/minContains.markdown +++ b/content/2020-12/validation/minContains.markdown @@ -24,7 +24,7 @@ related: keyword: items --- -The `minContains` keyword modifies the [`contains`]({{< ref +The [`minContains`]({{< ref "2020-12/validation/minContains" >}}) keyword modifies the [`contains`]({{< ref "2020-12/applicator/contains" >}}) keyword to constrain array instances to the given minimum number of containment matches. This keyword has no effect if the [`contains`]({{< ref "2020-12/applicator/contains" >}}) keyword is not declared. @@ -36,7 +36,7 @@ introducing additional computational overhead. For example, consider an array of 10 items where 5 of its items validate against the [`contains`]({{< ref "2020-12/applicator/contains" >}}) subschema -and `minContains` is set to to 2. When not collecting annotations, validation +and [`minContains`]({{< ref "2020-12/validation/minContains" >}}) is set to to 2. When not collecting annotations, validation will stop after encountering the second match. However, when collecting annotations, validation will have to proceed past the second match to report the 5 matching indexes.{{}} diff --git a/content/2020-12/validation/minItems.markdown b/content/2020-12/validation/minItems.markdown index 7ae2c0eb..c9b38ba6 100644 --- a/content/2020-12/validation/minItems.markdown +++ b/content/2020-12/validation/minItems.markdown @@ -24,7 +24,7 @@ related: keyword: contains --- -The `minItems` keyword restricts array instances to consists of an inclusive +The [`minItems`]({{< ref "2020-12/validation/minItems" >}}) keyword restricts array instances to consists of an inclusive minimum numbers of items. {{}} The presence of this keyword does not depend on the diff --git a/content/2020-12/validation/minLength.markdown b/content/2020-12/validation/minLength.markdown index c80a7781..85467212 100644 --- a/content/2020-12/validation/minLength.markdown +++ b/content/2020-12/validation/minLength.markdown @@ -22,7 +22,7 @@ related: keyword: format --- -The `minLength` keyword restricts string instances to consists of an inclusive +The [`minLength`]({{< ref "2020-12/validation/minLength" >}}) keyword restricts string instances to consists of an inclusive minimum number of [Unicode](https://unicode.org) code-points (logical characters), which is not necessarily the same as the number of bytes in the string. diff --git a/content/2020-12/validation/minProperties.markdown b/content/2020-12/validation/minProperties.markdown index c6468dcd..76d83c20 100644 --- a/content/2020-12/validation/minProperties.markdown +++ b/content/2020-12/validation/minProperties.markdown @@ -24,7 +24,7 @@ related: keyword: additionalProperties --- -The `minProperties` keyword restricts object instances to consists of an +The [`minProperties`]({{< ref "2020-12/validation/minProperties" >}}) keyword restricts object instances to consists of an inclusive minimum numbers of properties. {{}} The presence of this keyword does not depend on the diff --git a/content/2020-12/validation/minimum.markdown b/content/2020-12/validation/minimum.markdown index 22652f8d..a862fa1b 100644 --- a/content/2020-12/validation/minimum.markdown +++ b/content/2020-12/validation/minimum.markdown @@ -22,7 +22,7 @@ related: keyword: multipleOf --- -The `minimum` keyword restricts number instances to be greater than or equal to +The [`minimum`]({{< ref "2020-12/validation/minimum" >}}) keyword restricts number instances to be greater than or equal to the given number. {{}} diff --git a/content/2020-12/validation/multipleOf.markdown b/content/2020-12/validation/multipleOf.markdown index e472dcbe..29baca08 100644 --- a/content/2020-12/validation/multipleOf.markdown +++ b/content/2020-12/validation/multipleOf.markdown @@ -24,9 +24,9 @@ related: keyword: minimum --- -The `multipleOf` keyword restricts number instances to be multiples of the +The [`multipleOf`]({{< ref "2020-12/validation/multipleOf" >}}) keyword restricts number instances to be multiples of the given number. Note that the number `0` is a multiple of every number, as for -every number `k`, the mutiplication `0 * k` yield an integer value (in this +every number `k`, the multiplication `0 * k` yield an integer value (in this case always 0). This case is not to be confused with [division by zero](https://en.wikipedia.org/wiki/Division_by_zero), which is not a permitted operation in most computer systems. diff --git a/content/2020-12/validation/pattern.markdown b/content/2020-12/validation/pattern.markdown index 98c9d27b..8ca5f6fb 100644 --- a/content/2020-12/validation/pattern.markdown +++ b/content/2020-12/validation/pattern.markdown @@ -1,7 +1,7 @@ --- keyword: "pattern" signature: "String" -value: This keyword must be set to a regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour +value: This keyword must be set to a regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour summary: "A string instance is considered valid if the regular expression matches the instance successfully." kind: [ "assertion" ] instance: [ "string" ] @@ -26,7 +26,7 @@ related: keyword: type --- -The `pattern` keyword restricts string instances to match the given regular +The [`pattern`]({{< ref "2020-12/validation/pattern" >}}) keyword restricts string instances to match the given regular expression. {{}} While the specification suggests the use of diff --git a/content/2020-12/validation/required.markdown b/content/2020-12/validation/required.markdown index 15904679..aff206e5 100644 --- a/content/2020-12/validation/required.markdown +++ b/content/2020-12/validation/required.markdown @@ -24,11 +24,11 @@ related: keyword: minProperties --- -The `required` keyword restricts object instances to define the given set of properties. +The [`required`]({{< ref "2020-12/validation/required" >}}) keyword restricts object instances to define the given set of properties. {{}} The presence of this keyword does not depend on the presence of the [`properties`]({{< ref "2020-12/applicator/properties" >}}) -keyword. The `required` keyword mandates that certain properties are present +keyword. The [`required`]({{< ref "2020-12/validation/required" >}}) keyword mandates that certain properties are present (independently of their value), while the [`properties`]({{< ref "2020-12/applicator/properties" >}}) keyword describes the value of such properties when present.{{}} diff --git a/content/2020-12/validation/type.markdown b/content/2020-12/validation/type.markdown index bef75358..5d3b81db 100644 --- a/content/2020-12/validation/type.markdown +++ b/content/2020-12/validation/type.markdown @@ -63,7 +63,7 @@ Rauschmayer for a more detailed overview of JavaScript's numeric limitations.{{}} {{}}JSON allows numbers to be represented in [scientific -expontential +exponential notation](https://en.wikipedia.org/wiki/Scientific_notation#E_notation). For example, numbers like `1.0e+28` (equivalent to 10000000000000000000000000000.0) are valid according to the JSON grammar. This notation is convenient for @@ -89,7 +89,7 @@ standard.{{}} 3.14 {{< /instance-pass >}} -{{< instance-pass "A number in scientific expontential notation is valid" >}} +{{< instance-pass "A number in scientific exponential notation is valid" >}} 1.0e+28 {{< /instance-pass >}} diff --git a/content/2020-12/validation/uniqueItems.markdown b/content/2020-12/validation/uniqueItems.markdown index c87cd293..c69e74b7 100644 --- a/content/2020-12/validation/uniqueItems.markdown +++ b/content/2020-12/validation/uniqueItems.markdown @@ -21,7 +21,7 @@ related: keyword: contains --- -When set to `true`, the `uniqueItems` keyword restricts array instances to +When set to `true`, the [`uniqueItems`]({{< ref "2020-12/validation/uniqueItems" >}}) keyword restricts array instances to items that only occur once in the array. Note that empty arrays and arrays that consist of a single item satisfy uniqueness by definition. diff --git a/content/draft3/core/additionalItems.markdown b/content/draft3/core/additionalItems.markdown index d9ce3b66..017c33b2 100644 --- a/content/draft3/core/additionalItems.markdown +++ b/content/draft3/core/additionalItems.markdown @@ -2,7 +2,7 @@ keyword: "additionalItems" signature: "Schema | Boolean" value: This keyword must be set to a valid JSON Schema -summary: "If [`items`](/draft3/validation/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." +summary: "If [`items`](/draft3/core/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." kind: [ "applicator" ] instance: [ "array" ] specification: "https://json-schema.org/draft-03/draft-zyp-json-schema-03.pdf#5.6" diff --git a/content/draft3/core/default.markdown b/content/draft3/core/default.markdown index 7fb4ae38..c3a2d820 100644 --- a/content/draft3/core/default.markdown +++ b/content/draft3/core/default.markdown @@ -1,7 +1,7 @@ --- keyword: "default" signature: "Any" -value: This keyword must be set to a JSON value, preferrably that successfully validates against the corresponding subschema +value: This keyword must be set to a JSON value, preferably that successfully validates against the corresponding subschema summary: "This keyword can be used to supply a default JSON value associated with a particular schema." kind: [ "annotation" ] instance: [ "any" ] diff --git a/content/draft3/core/exclusiveMaximum.markdown b/content/draft3/core/exclusiveMaximum.markdown index 9ae7423d..88d281bc 100644 --- a/content/draft3/core/exclusiveMaximum.markdown +++ b/content/draft3/core/exclusiveMaximum.markdown @@ -2,7 +2,7 @@ keyword: "exclusiveMaximum" signature: "Boolean" value: This keyword must be set to a boolean value -summary: "When [`maximum`](/draft3/validation/maximum) is present and this keyword is set to true, the numeric instance must be less than the value in [`maximum`](/draft3/validation/maximum)." +summary: "When [`maximum`](/draft3/core/maximum) is present and this keyword is set to true, the numeric instance must be less than the value in [`maximum`](/draft3/core/maximum)." summary: "Validation succeeds if the numeric instance is less than the given number." kind: [ "assertion" ] instance: [ "number" ] diff --git a/content/draft3/core/exclusiveMinimum.markdown b/content/draft3/core/exclusiveMinimum.markdown index 1928652a..cbdbed82 100644 --- a/content/draft3/core/exclusiveMinimum.markdown +++ b/content/draft3/core/exclusiveMinimum.markdown @@ -2,7 +2,7 @@ keyword: "exclusiveMinimum" signature: "Boolean" value: This keyword must be set to a boolean value -summary: "When [`minimum`](/draft3/validation/minimum) is present and this keyword is set to true, the numeric instance must be greater than the value in [`minimum`](/draft3/validation/minimum)." +summary: "When [`minimum`](/draft3/core/minimum) is present and this keyword is set to true, the numeric instance must be greater than the value in [`minimum`](/draft3/core/minimum)." kind: [ "assertion" ] instance: [ "number" ] specification: "https://json-schema.org/draft-03/draft-zyp-json-schema-03.pdf#5.11" diff --git a/content/draft3/core/format.markdown b/content/draft3/core/format.markdown index 152b9672..97e5a22d 100644 --- a/content/draft3/core/format.markdown +++ b/content/draft3/core/format.markdown @@ -1,7 +1,7 @@ --- keyword: "format" signature: "String" -value: This keyword must be set to a string, preferrably one that is standardized by JSON Schema to ensure interoperability +value: This keyword must be set to a string, preferably one that is standardized by JSON Schema to ensure interoperability summary: "Define semantic information about a string instance." kind: [ "annotation" ] instance: [ "string" ] diff --git a/content/draft3/core/maximum.markdown b/content/draft3/core/maximum.markdown index 161654e5..a952ed56 100644 --- a/content/draft3/core/maximum.markdown +++ b/content/draft3/core/maximum.markdown @@ -2,7 +2,7 @@ keyword: "maximum" signature: "Number" value: This keyword must be set to a number -summary: "Validation succeeds if the numeric instance is less than, or equal to, the given number, depending on the value of [`exclusiveMaximum`](/draft3/validation/exclusiveMaximum), if any." +summary: "Validation succeeds if the numeric instance is less than, or equal to, the given number, depending on the value of [`exclusiveMaximum`](/draft3/core/exclusiveMaximum), if any." kind: [ "assertion" ] instance: [ "number" ] specification: "https://json-schema.org/draft-03/draft-zyp-json-schema-03.pdf#5.10" diff --git a/content/draft3/core/minimum.markdown b/content/draft3/core/minimum.markdown index 79be6570..696a4617 100644 --- a/content/draft3/core/minimum.markdown +++ b/content/draft3/core/minimum.markdown @@ -2,7 +2,7 @@ keyword: "minimum" signature: "Number" value: This keyword must be set to a number -summary: "Validation succeeds if the numeric instance is greater than, or equal to, the given number, depending on the value of [`exclusiveMinimum`](/draft3/validation/exclusiveMinimum), if any." +summary: "Validation succeeds if the numeric instance is greater than, or equal to, the given number, depending on the value of [`exclusiveMinimum`](/draft3/core/exclusiveMinimum), if any." kind: [ "assertion" ] instance: [ "number" ] specification: "https://json-schema.org/draft-03/draft-zyp-json-schema-03.pdf#5.9" diff --git a/content/draft3/core/pattern.markdown b/content/draft3/core/pattern.markdown index 25f9ab11..184d382d 100644 --- a/content/draft3/core/pattern.markdown +++ b/content/draft3/core/pattern.markdown @@ -1,7 +1,7 @@ --- keyword: "pattern" signature: "String" -value: This keyword must be set to a regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour +value: This keyword must be set to a regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour summary: "A string instance is considered valid if the regular expression matches the instance successfully." kind: [ "assertion" ] instance: [ "string" ] diff --git a/content/draft3/core/patternProperties.markdown b/content/draft3/core/patternProperties.markdown index 805c857b..731bc1fe 100644 --- a/content/draft3/core/patternProperties.markdown +++ b/content/draft3/core/patternProperties.markdown @@ -1,7 +1,7 @@ --- keyword: "patternProperties" signature: "Object" -value: This keyword must be set to an object where each key is a valid regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema +value: This keyword must be set to an object where each key is a valid regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema summary: "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." kind: [ "applicator" ] instance: [ "object" ] diff --git a/content/draft4/validation/allOf.markdown b/content/draft4/validation/allOf.markdown index 84c93d97..c031b784 100644 --- a/content/draft4/validation/allOf.markdown +++ b/content/draft4/validation/allOf.markdown @@ -33,7 +33,7 @@ subschema (the intersection of the constraints). versions, any subschema declaring the `$ref` keyword is considered to be a _reference object_ and any other sibling keyword will be silently ignored. To avoid this, wrap subschemas with references that make use of other keywords -using the [`allOf`](../../validation/allOf) keyword. {{}} +using the [`allOf`]({{< ref "draft4/validation/allOf" >}}) keyword. {{}} {{}}This keyword typically has a single use case: combining one or more schemas through the use of (internal or external) references. If this diff --git a/content/draft4/validation/default.markdown b/content/draft4/validation/default.markdown index e10c6b55..497e63e3 100644 --- a/content/draft4/validation/default.markdown +++ b/content/draft4/validation/default.markdown @@ -1,7 +1,7 @@ --- keyword: "default" signature: "Any" -value: This keyword must be set to a JSON value, preferrably that successfully validates against the corresponding subschema +value: This keyword must be set to a JSON value, preferably that successfully validates against the corresponding subschema summary: "This keyword can be used to supply a default JSON value associated with a particular schema." kind: [ "annotation" ] instance: [ "any" ] diff --git a/content/draft4/validation/definitions.markdown b/content/draft4/validation/definitions.markdown index 8a4df772..2f66a819 100644 --- a/content/draft4/validation/definitions.markdown +++ b/content/draft4/validation/definitions.markdown @@ -2,7 +2,7 @@ keyword: "definitions" signature: "Object" value: This keyword must be set to an object where each value is a valid JSON Schema -summary: "This keyword reserves a location for schema authors to inline re-usable JSON Schemas into a more general schema." +summary: "This keyword reserves a location for schema authors to inline reusable JSON Schemas into a more general schema." kind: [ "location" ] instance: [ "any" ] specification: "https://json-schema.org/draft-04/draft-fge-json-schema-validation-00#rfc.section.5.5.7" diff --git a/content/draft4/validation/format.markdown b/content/draft4/validation/format.markdown index 3ccc4e7f..e06494dd 100644 --- a/content/draft4/validation/format.markdown +++ b/content/draft4/validation/format.markdown @@ -1,7 +1,7 @@ --- keyword: "format" signature: "String" -value: This keyword must be set to a string, preferrably one that is standardized by JSON Schema to ensure interoperability +value: This keyword must be set to a string, preferably one that is standardized by JSON Schema to ensure interoperability summary: "Define semantic information about a string instance." kind: [ "annotation" ] instance: [ "string" ] diff --git a/content/draft4/validation/pattern.markdown b/content/draft4/validation/pattern.markdown index 3594c123..7696bcd0 100644 --- a/content/draft4/validation/pattern.markdown +++ b/content/draft4/validation/pattern.markdown @@ -1,7 +1,7 @@ --- keyword: "pattern" signature: "String" -value: This keyword must be set to a regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour +value: This keyword must be set to a regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour summary: "A string instance is considered valid if the regular expression matches the instance successfully." kind: [ "assertion" ] instance: [ "string" ] diff --git a/content/draft4/validation/patternProperties.markdown b/content/draft4/validation/patternProperties.markdown index 7b9b12ff..7303596e 100644 --- a/content/draft4/validation/patternProperties.markdown +++ b/content/draft4/validation/patternProperties.markdown @@ -1,7 +1,7 @@ --- keyword: "patternProperties" signature: "Object | Boolean" -value: This keyword must be set to an object where each key is a valid regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema +value: This keyword must be set to an object where each key is a valid regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema summary: "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." kind: [ "applicator" ] instance: [ "object" ] diff --git a/content/draft6/validation/allOf.markdown b/content/draft6/validation/allOf.markdown index d767f0e2..1654d37f 100644 --- a/content/draft6/validation/allOf.markdown +++ b/content/draft6/validation/allOf.markdown @@ -33,7 +33,7 @@ subschema (the intersection of the constraints). versions, any subschema declaring the `$ref` keyword is considered to be a _reference object_ and any other sibling keyword will be silently ignored. To avoid this, wrap subschemas with references that make use of other keywords -using the [`allOf`](../../validation/allOf) keyword. {{}} +using the [`allOf`]({{< ref "draft6/validation/allOf" >}}) keyword. {{}} {{}}This keyword typically has a single use case: combining one or more schemas through the use of (internal or external) references. If this diff --git a/content/draft6/validation/default.markdown b/content/draft6/validation/default.markdown index 7aa4b409..b7c8485d 100644 --- a/content/draft6/validation/default.markdown +++ b/content/draft6/validation/default.markdown @@ -1,7 +1,7 @@ --- keyword: "default" signature: "Any" -value: This keyword must be set to a JSON value, preferrably that successfully validates against the corresponding subschema +value: This keyword must be set to a JSON value, preferably that successfully validates against the corresponding subschema summary: "This keyword can be used to supply a default JSON value associated with a particular schema." kind: [ "annotation" ] instance: [ "any" ] diff --git a/content/draft6/validation/definitions.markdown b/content/draft6/validation/definitions.markdown index 8acdd912..ead43093 100644 --- a/content/draft6/validation/definitions.markdown +++ b/content/draft6/validation/definitions.markdown @@ -2,7 +2,7 @@ keyword: "definitions" signature: "Object" value: This keyword must be set to an object where each value is a valid JSON Schema -summary: "This keyword reserves a location for schema authors to inline re-usable JSON Schemas into a more general schema." +summary: "This keyword reserves a location for schema authors to inline reusable JSON Schemas into a more general schema." kind: [ "location" ] instance: [ "any" ] specification: "https://json-schema.org/draft-06/draft-wright-json-schema-validation-01#rfc.section.7.1" diff --git a/content/draft6/validation/examples.markdown b/content/draft6/validation/examples.markdown index 8736229c..b4c6d0db 100644 --- a/content/draft6/validation/examples.markdown +++ b/content/draft6/validation/examples.markdown @@ -1,7 +1,7 @@ --- keyword: "examples" signature: "Array" -value: This keyword must be set to an array of JSON values that preferrably successfully validates against the corresponding subschema +value: This keyword must be set to an array of JSON values that preferably successfully validates against the corresponding subschema summary: "This keyword is used to provide sample JSON values associated with a particular schema, for the purpose of illustrating usage." kind: [ "annotation" ] instance: [ "any" ] diff --git a/content/draft6/validation/format.markdown b/content/draft6/validation/format.markdown index 29ff201e..3e86f9c8 100644 --- a/content/draft6/validation/format.markdown +++ b/content/draft6/validation/format.markdown @@ -1,7 +1,7 @@ --- keyword: "format" signature: "String" -value: This keyword must be set to a string, preferrably one that is standardized by JSON Schema to ensure interoperability +value: This keyword must be set to a string, preferably one that is standardized by JSON Schema to ensure interoperability summary: "Define semantic information about a string instance." kind: [ "annotation" ] instance: [ "string" ] diff --git a/content/draft6/validation/pattern.markdown b/content/draft6/validation/pattern.markdown index d5dc0625..fbb06d7d 100644 --- a/content/draft6/validation/pattern.markdown +++ b/content/draft6/validation/pattern.markdown @@ -1,7 +1,7 @@ --- keyword: "pattern" signature: "String" -value: This keyword must be set to a regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour +value: This keyword must be set to a regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour summary: "A string instance is considered valid if the regular expression matches the instance successfully." kind: [ "assertion" ] instance: [ "string" ] diff --git a/content/draft6/validation/patternProperties.markdown b/content/draft6/validation/patternProperties.markdown index 55d31c5e..4f671573 100644 --- a/content/draft6/validation/patternProperties.markdown +++ b/content/draft6/validation/patternProperties.markdown @@ -1,7 +1,7 @@ --- keyword: "patternProperties" signature: "Object" -value: This keyword must be set to an object where each key is a valid regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema +value: This keyword must be set to an object where each key is a valid regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema summary: "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." kind: [ "applicator" ] instance: [ "object" ] diff --git a/content/draft7/validation/allOf.markdown b/content/draft7/validation/allOf.markdown index 33289ccf..994f6094 100644 --- a/content/draft7/validation/allOf.markdown +++ b/content/draft7/validation/allOf.markdown @@ -39,7 +39,7 @@ subschema (the intersection of the constraints). versions, any subschema declaring the `$ref` keyword is considered to be a _reference object_ and any other sibling keyword will be silently ignored. To avoid this, wrap subschemas with references that make use of other keywords -using the [`allOf`](../../validation/allOf) keyword. {{}} +using the [`allOf`]({{< ref "draft7/validation/allOf" >}}) keyword. {{}} {{}}This keyword typically has a single use case: combining one or more schemas through the use of (internal or external) references. If this diff --git a/content/draft7/validation/default.markdown b/content/draft7/validation/default.markdown index c078f35b..a96b7598 100644 --- a/content/draft7/validation/default.markdown +++ b/content/draft7/validation/default.markdown @@ -1,7 +1,7 @@ --- keyword: "default" signature: "Any" -value: This keyword must be set to a JSON value, preferrably that successfully validates against the corresponding subschema +value: This keyword must be set to a JSON value, preferably that successfully validates against the corresponding subschema summary: "This keyword can be used to supply a default JSON value associated with a particular schema." kind: [ "annotation" ] instance: [ "any" ] diff --git a/content/draft7/validation/definitions.markdown b/content/draft7/validation/definitions.markdown index c7344844..bb27049b 100644 --- a/content/draft7/validation/definitions.markdown +++ b/content/draft7/validation/definitions.markdown @@ -2,7 +2,7 @@ keyword: "definitions" signature: "Object" value: This keyword must be set to an object where each value is a valid JSON Schema -summary: "This keyword reserves a location for schema authors to inline re-usable JSON Schemas into a more general schema." +summary: "This keyword reserves a location for schema authors to inline reusable JSON Schemas into a more general schema." kind: [ "location" ] instance: [ "any" ] specification: "https://json-schema.org/draft-07/draft-handrews-json-schema-validation-01#rfc.section.9" diff --git a/content/draft7/validation/examples.markdown b/content/draft7/validation/examples.markdown index e9f3b43c..1354a7dd 100644 --- a/content/draft7/validation/examples.markdown +++ b/content/draft7/validation/examples.markdown @@ -1,7 +1,7 @@ --- keyword: "examples" signature: "Array" -value: This keyword must be set to an array of JSON values that preferrably successfully validates against the corresponding subschema +value: This keyword must be set to an array of JSON values that preferably successfully validates against the corresponding subschema summary: "This keyword is used to provide sample JSON values associated with a particular schema, for the purpose of illustrating usage." kind: [ "annotation" ] instance: [ "any" ] diff --git a/content/draft7/validation/format.markdown b/content/draft7/validation/format.markdown index 6a2f562d..b5920f9a 100644 --- a/content/draft7/validation/format.markdown +++ b/content/draft7/validation/format.markdown @@ -1,7 +1,7 @@ --- keyword: "format" signature: "String" -value: This keyword must be set to a string, preferrably one that is standardized by JSON Schema to ensure interoperability +value: This keyword must be set to a string, preferably one that is standardized by JSON Schema to ensure interoperability summary: "Define semantic information about a string instance." kind: [ "annotation" ] instance: [ "string" ] diff --git a/content/draft7/validation/pattern.markdown b/content/draft7/validation/pattern.markdown index 7bdae556..1291e114 100644 --- a/content/draft7/validation/pattern.markdown +++ b/content/draft7/validation/pattern.markdown @@ -1,7 +1,7 @@ --- keyword: "pattern" signature: "String" -value: This keyword must be set to a regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour +value: This keyword must be set to a regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour summary: "A string instance is considered valid if the regular expression matches the instance successfully." kind: [ "assertion" ] instance: [ "string" ] diff --git a/content/draft7/validation/patternProperties.markdown b/content/draft7/validation/patternProperties.markdown index edb20b96..102c6d57 100644 --- a/content/draft7/validation/patternProperties.markdown +++ b/content/draft7/validation/patternProperties.markdown @@ -1,7 +1,7 @@ --- keyword: "patternProperties" signature: "Object" -value: This keyword must be set to an object where each key is a valid regular expression, preferrably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema +value: This keyword must be set to an object where each key is a valid regular expression, preferably using the [ECMA-262](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) flavour, and each value is a valid JSON Schema summary: "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." kind: [ "applicator" ] instance: [ "object" ]