Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/website-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions content/2019-09/applicator/allOf.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ subschema (the intersection of the constraints).

{{<common-pitfall>}} 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
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/applicator/patternProperties.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
keyword: "patternProperties"
signature: "Object<String, Schema>"
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" ]
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/applicator/propertyNames.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ the object by setting the [`additionalProperties`]({{< ref
"Hello World"
{{</instance-pass>}}

{{<schema `A schema that incorrecly constrains object property names to an impossible type`>}}
{{<schema `A schema that incorrectly constrains object property names to an impossible type`>}}
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"propertyNames": { "type": "array" }
Expand Down
4 changes: 2 additions & 2 deletions content/2019-09/applicator/unevaluatedItems.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions content/2019-09/applicator/unevaluatedProperties.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions content/2019-09/core/defs.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
keyword: "$defs"
signature: "Object<String, Schema>"
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"
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions content/2019-09/core/recursiveAnchor.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -102,22 +102,22 @@ $ jsonschema validate custom-metaschema.json schema.json --trace
}
{{</schema>}}

{{<instance-pass `An object with a top-level occurence of the custom keyword is valid`>}}
{{<instance-pass `An object with a top-level occurrence of the custom keyword is valid`>}}
{ "my-custom-keyword": "foo" }
{{</instance-pass>}}

{{<instance-annotation>}}
{ "keyword": "/properties", "instance": "", "value": [ "my-custom-keyword" ] }
{{</instance-annotation>}}

{{<instance-pass `An object with a nested occurence of the custom keyword is valid`>}}
{{<instance-pass `An object with a nested occurrence of the custom keyword is valid`>}}
{ "additionalProperties": { "my-custom-keyword": "foo" } }
{{</instance-pass>}}

{{<instance-annotation>}}
{ "keyword": "/properties", "instance": "/additionalProperties", "value": [ "my-custom-keyword" ] }
{{</instance-annotation>}}

{{<instance-fail `An object with an incorrect nested occurence of the custom keyword is invalid`>}}
{{<instance-fail `An object with an incorrect nested occurrence of the custom keyword is invalid`>}}
{ "additionalProperties": { "my-custom-keyword": 1 } }
{{</instance-fail>}}
10 changes: 5 additions & 5 deletions content/2019-09/core/recursiveRef.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ 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.

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"_.

{{<common-pitfall>}}The [`$recursiveRef`]({{< ref "2019-09/core/recursiveref"
>}}) keyword only supports the special empty fragment `"#"` and it cannot be
Expand Down Expand Up @@ -112,22 +112,22 @@ $ jsonschema validate custom-metaschema.json schema.json --trace
}
{{</schema>}}

{{<instance-pass `An object with a top-level occurence of the custom keyword is valid`>}}
{{<instance-pass `An object with a top-level occurrence of the custom keyword is valid`>}}
{ "my-custom-keyword": "foo" }
{{</instance-pass>}}

{{<instance-annotation>}}
{ "keyword": "/properties", "instance": "", "value": [ "my-custom-keyword" ] }
{{</instance-annotation>}}

{{<instance-pass `An object with a nested occurence of the custom keyword is valid`>}}
{{<instance-pass `An object with a nested occurrence of the custom keyword is valid`>}}
{ "additionalProperties": { "my-custom-keyword": "foo" } }
{{</instance-pass>}}

{{<instance-annotation>}}
{ "keyword": "/properties", "instance": "/additionalProperties", "value": [ "my-custom-keyword" ] }
{{</instance-annotation>}}

{{<instance-fail `An object with an incorrect nested occurence of the custom keyword is invalid`>}}
{{<instance-fail `An object with an incorrect nested occurrence of the custom keyword is invalid`>}}
{ "additionalProperties": { "my-custom-keyword": 1 } }
{{</instance-fail>}}
2 changes: 1 addition & 1 deletion content/2019-09/format/format.markdown
Original file line number Diff line number Diff line change
@@ -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" ]
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/meta-data/default.markdown
Original file line number Diff line number Diff line change
@@ -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" ]
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/meta-data/deprecated.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ an annotation that does not carry any additional meaning.
{{<common-pitfall>}}

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
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/meta-data/description.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ concise summary altogether.
{{<common-pitfall>}}

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
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/meta-data/examples.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
keyword: "examples"
signature: "Array<Any>"
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" ]
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/meta-data/readOnly.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ location, resulting in ambiguous semantics.
{{<common-pitfall>}}

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
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/meta-data/title.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ you run out of space, you can move the additional information to the
{{<common-pitfall>}}

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
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/meta-data/writeOnly.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ location, resulting in ambiguous semantics.
{{<common-pitfall>}}

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
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/validation/const.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ anti-pattern.{{</best-practice>}}

{{<common-pitfall>}} 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`.{{</common-pitfall>}}
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/validation/enum.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ anti-pattern.{{</best-practice>}}

{{<common-pitfall>}} 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`.{{</common-pitfall>}}
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/validation/multipleOf.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion content/2019-09/validation/pattern.markdown
Original file line number Diff line number Diff line change
@@ -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" ]
Expand Down
4 changes: 2 additions & 2 deletions content/2019-09/validation/type.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Rauschmayer for a more detailed overview of JavaScript's numeric
limitations.{{</common-pitfall>}}

{{<learning-more>}}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
Expand All @@ -90,7 +90,7 @@ standard.{{</learning-more>}}
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 >}}

Expand Down
12 changes: 6 additions & 6 deletions content/2020-12/applicator/additionalProperties.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

{{<common-pitfall>}}The use of the [`properties`]({{< ref
Expand Down
Loading