Skip to content

Commit c61017e

Browse files
authored
Revise keyword links (#299)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent c2a935d commit c61017e

File tree

105 files changed

+263
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+263
-243
lines changed

.github/workflows/website-build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10+
codespell:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- run: sudo apt-get update && sudo apt-get install --yes codespell
14+
- uses: actions/checkout@v4
15+
- run: codespell content
16+
1017
build:
1118
runs-on: ubuntu-latest
1219
steps:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM debian:bookworm-slim
22
RUN apt-get update \
3-
&& apt-get install -y make nodejs npm curl ca-certificates \
3+
&& apt-get install -y make nodejs npm curl ca-certificates codespell \
44
&& rm -rf /var/lib/apt/lists/*
55

66
ARG HUGO_VERSION=0.147.2

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@ HUGO ?= hugo
44
RMRF ?= rm -rf
55
NPM ?= npm
66
DOCKER ?= docker
7+
CODESPELL ?= codespell
78

89
node_modules: package.json package-lock.json
910
$(NPM) ci
1011

1112
.PHONY: all
1213
all: node_modules
14+
$(CODESPELL) content
1315
$(HUGO) server --buildDrafts --environment development
1416

1517
.PHONY: html
1618
html: node_modules
19+
$(CODESPELL) content
1720
$(HUGO) --environment production --destination dist
1821

1922
.PHONY: clean

content/2019-09/applicator/allOf.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ subschema (the intersection of the constraints).
3737

3838
{{<common-pitfall>}} Wrapping a single instance of the [`$ref`]({{< ref
3939
"2019-09/core/ref" >}}) or [`$recursiveRef`]({{< ref
40-
"2019-09/core/recursiveref" >}}) keyword in an `allOf` operator is an
41-
anti-pattern.
40+
"2019-09/core/recursiveref" >}}) keyword in an [`allOf`]({{< ref
41+
"2019-09/applicator/allof" >}}) operator is an anti-pattern.
4242

4343
This practice has historical roots. In JSON Schema [Draft 7](/draft7) and
4444
earlier versions, any subschema declaring the [`$ref`]({{< ref

content/2019-09/applicator/patternProperties.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
keyword: "patternProperties"
33
signature: "Object<String, Schema>"
4-
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
4+
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
55
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."
66
kind: [ "applicator", "annotation" ]
77
instance: [ "object" ]

content/2019-09/applicator/propertyNames.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ the object by setting the [`additionalProperties`]({{< ref
8585
"Hello World"
8686
{{</instance-pass>}}
8787

88-
{{<schema `A schema that incorrecly constrains object property names to an impossible type`>}}
88+
{{<schema `A schema that incorrectly constrains object property names to an impossible type`>}}
8989
{
9090
"$schema": "https://json-schema.org/draft/2019-09/schema",
9191
"propertyNames": { "type": "array" }

content/2019-09/applicator/unevaluatedItems.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The [`unevaluatedItems`]({{< ref "2019-09/applicator/unevaluateditems" >}})
2929
keyword is a generalisation of the [`additionalItems`]({{< ref
3030
"2019-09/applicator/additionalitems" >}}) keyword that considers related
3131
keywords even when they are not direct siblings of this keyword. More
32-
specifically, this keyword is affected by occurences of [`items`]({{< ref
32+
specifically, this keyword is affected by occurrences of [`items`]({{< ref
3333
"2019-09/applicator/items" >}}), [`additionalItems`]({{< ref
3434
"2019-09/applicator/additionalitems" >}}), and [`unevaluatedItems`]({{< ref
3535
"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:
4545
(1) Elegantly describing additional array items while declaring the
4646
[`items`]({{< ref "2019-09/applicator/items" >}}) or [`additionalItems`]({{<
4747
ref "2019-09/applicator/additionalitems" >}}) keywords behind conditional logic
48-
without duplicating these keywords in every possible branch. (2) Re-using
48+
without duplicating these keywords in every possible branch. (2) Reusing
4949
helpers that consist of the [`items`]({{< ref "2019-09/applicator/items" >}})
5050
or [`additionalItems`]({{< ref "2019-09/applicator/additionalitems" >}})
5151
keywords, while specialising the helpers as needed in specific locations

content/2019-09/applicator/unevaluatedProperties.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The [`unevaluatedProperties`]({{< ref
3232
of the [`additionalProperties`]({{< ref
3333
"2019-09/applicator/additionalproperties" >}}) keyword that considers related
3434
keywords even when they are not direct siblings of this keyword. More
35-
specifically, this keyword is affected by occurences of [`properties`]({{<
35+
specifically, this keyword is affected by occurrences of [`properties`]({{<
3636
ref "2019-09/applicator/properties" >}}), [`patternProperties`]({{< ref
3737
"2019-09/applicator/patternproperties" >}}), [`additionalProperties`]({{< ref
3838
"2019-09/applicator/additionalproperties" >}}), and
@@ -52,7 +52,7 @@ declaring the [`properties`]({{< ref "2019-09/applicator/properties" >}}) or
5252
[`patternProperties`]({{< ref "2019-09/applicator/patternproperties" >}})
5353
keywords behind conditional logic without duplicating the
5454
[`additionalProperties`]({{< ref "2019-09/applicator/additionalproperties"
55-
>}}) keyword in every possible branch. (2) Re-using helpers that consist of
55+
>}}) keyword in every possible branch. (2) Reusing helpers that consist of
5656
the [`properties`]({{< ref "2019-09/applicator/properties" >}}),
5757
[`patternProperties`]({{< ref "2019-09/applicator/patternproperties" >}}), or
5858
[`additionalProperties`]({{< ref "2019-09/applicator/additionalproperties"

content/2019-09/core/defs.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
keyword: "$defs"
33
signature: "Object<String, Schema>"
44
value: This keyword must be set to an object where each value is a valid JSON Schema
5-
summary: "This keyword reserves a location for schema authors to inline re-usable JSON Schemas into a more general schema."
5+
summary: "This keyword reserves a location for schema authors to inline reusable JSON Schemas into a more general schema."
66
kind: [ "location" ]
77
instance: [ "any" ]
88
specification: "https://json-schema.org/draft/2019-09/draft-handrews-json-schema-02#rfc.section.8.2.5"
@@ -21,7 +21,7 @@ related:
2121
---
2222

2323
The [`$defs`]({{< ref "2019-09/core/defs" >}}) keyword is a container for
24-
storing re-usable schemas within a schema resource, which can be referenced
24+
storing reusable schemas within a schema resource, which can be referenced
2525
using the [`$ref`]({{< ref "2019-09/core/ref" >}}) or [`$recursiveRef`]({{<
2626
ref "2019-09/core/recursiveref" >}}) keywords. From a software engineering
2727
point of view, this keyword is analogous to defining _internal_ helper

content/2019-09/core/recursiveAnchor.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fragment identifier and records this association in the [dynamic
3131
scope](https://json-schema.org/blog/posts/dynamicref-and-generics). When
3232
resolving this anchor using the [`$recursiveRef`]({{< ref
3333
"2019-09/core/recursiveref" >}}) keyword, the base URI of the origin is not
34-
considered. Instead, evaluation jumps to the first encountered occurence of the
34+
considered. Instead, evaluation jumps to the first encountered occurrence of the
3535
given recursive anchor in the [stack of schema
3636
resources](https://json-schema.org/blog/posts/understanding-lexical-dynamic-scopes#the-dynamic-scope-as-a-stack)
3737
traversed so far.
@@ -102,22 +102,22 @@ $ jsonschema validate custom-metaschema.json schema.json --trace
102102
}
103103
{{</schema>}}
104104

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

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

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

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

121-
{{<instance-fail `An object with an incorrect nested occurence of the custom keyword is invalid`>}}
121+
{{<instance-fail `An object with an incorrect nested occurrence of the custom keyword is invalid`>}}
122122
{ "additionalProperties": { "my-custom-keyword": 1 } }
123123
{{</instance-fail>}}

0 commit comments

Comments
 (0)