Skip to content

Commit 824fee7

Browse files
committed
replace all external document references with links to document; remove appendices
1 parent 258d721 commit 824fee7

File tree

3 files changed

+89
-239
lines changed

3 files changed

+89
-239
lines changed

specs/jsonschema-core.md

Lines changed: 36 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ such as output formats.
3939

4040
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
4141
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
42-
interpreted as described in [RFC 2119](#rfc2119).
42+
interpreted as described in [RFC 2119](https://www.rfc-editor.org/info/rfc2119).
4343

4444
The terms "JSON", "JSON text", "JSON value", "member", "element", "object",
4545
"array", "number", "string", "boolean", "true", "false", and "null" in this
46-
document are to be interpreted as defined in [RFC 8259](#rfc8259).
46+
document are to be interpreted as defined in [RFC 8259](https://www.rfc-editor.org/info/rfc8259).
4747

4848
## Overview
4949

@@ -242,10 +242,10 @@ are using.
242242

243243
#### Root Schema and Subschemas and Resources {#root}
244244

245-
A JSON Schema resource is a schema which is [canonically](#rfc6596) identified
246-
by an [absolute IRI](#rfc3987). Schema resources MAY also be identified by IRIs,
245+
A JSON Schema resource is a schema which is [canonically](https://www.rfc-editor.org/info/rfc6596) identified
246+
by an [absolute IRI](https://www.rfc-editor.org/info/rfc3987). Schema resources MAY also be identified by IRIs,
247247
including IRIs with fragments, if the resulting secondary resource (as defined
248-
by [section 3.5 of RFC 3986](#rfc3986)) is identical to the primary resource.
248+
by [section 3.5 of RFC 3986](https://www.rfc-editor.org/info/rfc3986)) is identical to the primary resource.
249249
This can occur with the empty fragment, or when one schema resource is embedded
250250
in another. Any such IRIs with fragments are considered to be non-canonical.
251251

@@ -285,7 +285,7 @@ are processed in the same way, with the same available behaviors.
285285

286286
## Fragment Identifiers {#fragments}
287287

288-
In accordance with section 3.1 of [RFC 6839](#rfc6839), the syntax and semantics
288+
In accordance with section 3.1 of [RFC 6839](https://www.rfc-editor.org/info/rfc6839), the syntax and semantics
289289
of fragment identifiers specified for any +json media type SHOULD be as
290290
specified for `application/json`. (At publication of this document, there is no
291291
fragment identification syntax defined for `application/json`.)
@@ -296,7 +296,7 @@ identifier structures: plain names and JSON Pointers. The
296296
structure: JSON Pointers.
297297

298298
The use of JSON Pointers as IRI fragment identifiers is described in [RFC
299-
6901](#rfc6901). For `application/schema+json`, which supports two fragment
299+
6901](https://www.rfc-editor.org/info/rfc6901). For `application/schema+json`, which supports two fragment
300300
identifier syntaxes, fragment identifiers matching the JSON Pointer syntax,
301301
including the empty string, MUST be interpreted as JSON Pointer fragment
302302
identifiers.
@@ -306,9 +306,9 @@ identifiers](#w3cwd-fragid-best-practices-20121025), plain name fragment
306306
identifiers in `application/schema+json` are reserved for referencing locally
307307
named schemas.
308308

309-
Plain name fragments MUST follow XML's [`NCName` production](#xml-names), which
309+
Plain name fragments MUST follow XML's [`NCName` production](http://www.w3.org/TR/2006/REC-xml-names11-20060816), which
310310
allows for compatibility with the recommended plain name
311-
[syntax](#w3crec-xptr-framework-20030325) for XML-based media types. For
311+
[syntax](https://www.w3.org/TR/2003/REC-xptr-framework-20030325/) for XML-based media types. For
312312
convenience, the `NCName` syntax is reproduced here in ABNF form, using
313313
a minimal set of rules:
314314

@@ -336,7 +336,7 @@ keyword](#anchors) section.
336336

337337
### Range of JSON Values
338338

339-
An instance may be any valid JSON value as defined by [JSON](#rfc8259). JSON
339+
An instance may be any valid JSON value as defined by [JSON](https://www.rfc-editor.org/info/rfc8259). JSON
340340
Schema imposes no restrictions on type: JSON Schema can describe any JSON value,
341341
including, for example, null.
342342

@@ -352,7 +352,7 @@ describable by JSON.
352352
Keywords MAY use regular expressions to express constraints, or constrain the
353353
instance value to be a regular expression. These regular expressions SHOULD be
354354
valid according to the regular expression dialect described in [ECMA-262,
355-
section 21.2.1](#ecma262).
355+
section 21.2.1](https://www.ecma-international.org/ecma-262/11.0/index.html).
356356

357357
Unless otherwise specified by a keyword, regular expressions MUST NOT be
358358
considered to be implicitly anchored at either end. All regular expression
@@ -367,7 +367,7 @@ schema authors SHOULD limit themselves to the following regular expression
367367
tokens:
368368

369369
- individual Unicode characters, as defined by the [JSON
370-
specification](#rfc8259);
370+
specification](https://www.rfc-editor.org/info/rfc8259);
371371
- simple atoms: `.` (any character except line terminator);
372372
- simple character classes (`[abc]`), range character classes (`[a-z]`);
373373
- complemented simple character classes (`[^abc]`);
@@ -653,7 +653,7 @@ behalf of applications.
653653

654654
Unless otherwise specified, the value of an annotation keyword is the keyword's
655655
value. However, other behaviors are possible. For example, [JSON
656-
Hyper-Schema's](#json-hyper-schema) `links` keyword is a complex annotation that
656+
Hyper-Schema's](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02) `links` keyword is a complex annotation that
657657
produces a value based in part on the instance data.
658658

659659
While "short-circuit" evaluation is possible for assertions, collecting
@@ -685,7 +685,7 @@ based on the schema location that contributed the value. This is intended to
685685
allow flexible usage. Collecting the schema location facilitates such usage.
686686

687687
For example, consider this schema, which uses annotations and assertions from
688-
the [Validation specification](#json-schema-validation):
688+
the [Validation specification](./jsonschema-validation):
689689

690690
Note that some lines are wrapped for clarity.
691691

@@ -880,7 +880,7 @@ applies to the resource in which it is declared as well as any embedded schema
880880
resources, unless such a resource itself declares a different dialect by
881881
including the `$schema` keyword with a different value.
882882

883-
The value of this keyword MUST be an [IRI](#rfc3987) (containing a scheme) and
883+
The value of this keyword MUST be an [IRI](https://www.rfc-editor.org/info/rfc3987) (containing a scheme) and
884884
this IRI MUST be normalized.
885885

886886
If this IRI identifies a retrievable resource, that resource SHOULD be of media
@@ -896,26 +896,26 @@ by other parties.
896896
### Base IRI, Anchors, and Dereferencing
897897

898898
To differentiate between schemas in a vast ecosystem, schema resources are
899-
identified by [absolute IRIs](#rfc3987) (without fragments). These identifiers
899+
identified by [absolute IRIs](https://www.rfc-editor.org/info/rfc3987) (without fragments). These identifiers
900900
are used to create references between schema resources. When comparing IRIs for
901901
the purposes of resource identification, implementations SHOULD first follow the
902-
IRI normalization procedures defined in [RFC 3987](#rfc3987), section 5.3.
902+
IRI normalization procedures defined in [RFC 3987](https://www.rfc-editor.org/info/rfc3987), section 5.3.
903903

904-
Several keywords can accept a relative [IRI reference](#rfc3987), or a value
904+
Several keywords can accept a relative [IRI reference](https://www.rfc-editor.org/info/rfc3987), or a value
905905
used to construct a relative IRI reference. For these keywords, it is necessary
906906
to establish a base IRI in order to resolve the reference.
907907

908908
#### The `$id` Keyword {#id-keyword}
909909

910910
An `$id` keyword in a schema or subschema identifies that schema or subschema as
911911
a distinct schema resource. The value for this keyword MUST be a string, and
912-
MUST represent a valid [IRI reference](#rfc3987) without a fragment.
912+
MUST represent a valid [IRI reference](https://www.rfc-editor.org/info/rfc3987) without a fragment.
913913

914914
When the value of this keyword is resolved against the current base IRI, the
915915
resulting absolute IRI then serves as the identifier for the schema resource and
916916
as a base IRI for relative IRI references in keywords within that schema
917917
resource and for embedded schema resources, in accordance with [RFC 3987 section
918-
6.5](#rfc3987) and [RFC 3986 section 5.1.1](#rfc3986) regarding base IRIs
918+
6.5](https://www.rfc-editor.org/info/rfc3987) and [RFC 3986 section 5.1.1](https://www.rfc-editor.org/info/rfc3986) regarding base IRIs
919919
embedded in content and RFC 3986 section 5.1.2 regarding encapsulating entities.
920920

921921
Note that this IRI is an identifier and not necessarily a network locator. In
@@ -933,7 +933,7 @@ given in {{initial-base}}.
933933
##### Identifying the root schema
934934

935935
The root schema of a JSON Schema document SHOULD contain an `$id` keyword with
936-
an [absolute IRI](#rfc3987) (containing a scheme, but no fragment).
936+
an [absolute IRI](https://www.rfc-editor.org/info/rfc3987) (containing a scheme, but no fragment).
937937

938938
#### Defining location-independent identifiers {#anchors}
939939

@@ -951,7 +951,8 @@ fragments, rather than absolute IRIs as seen with `$id`.
951951
keyword is appended to the IRI of the schema resource containing it. As
952952
discussed in {{id-keyword}}, this is either the nearest `$id` in the same or an
953953
ancestor schema object, or the base IRI for the document as determined according
954-
to [RFC 3987](#rfc3987) and [RFC 3986](#rfc3986).
954+
to [RFC 3987](https://www.rfc-editor.org/info/rfc3987) and
955+
[RFC 3986](https://www.rfc-editor.org/info/rfc3986).
955956

956957
In contrast, `$dynamicAnchor` operates independently of resource IRIs and is
957958
instead dependent on the dynamic scope of the evaluation. `$dynamicAnchor`
@@ -1086,20 +1087,20 @@ MUST NOT be collected as an annotation result.
10861087

10871088
#### Initial Base IRI {#initial-base}
10881089

1089-
[RFC 3987 Section 6.5](#rfc3987) and [RFC 3986 Section 5.1](#rfc3986) defines
1090+
[RFC 3987 Section 6.5](https://www.rfc-editor.org/info/rfc3987) and [RFC 3986 Section 5.1](https://www.rfc-editor.org/info/rfc3986) defines
10901091
how to determine the default base IRI of a document.
10911092

10921093
Informatively, the initial base IRI of a schema is the IRI at which it was
10931094
found, whether that was a network location, a local filesystem, or any other
10941095
situation identifiable by a IRI of any known scheme.
10951096

10961097
If a schema document defines no explicit base IRI with `$id` (embedded in
1097-
content), the base IRI is that determined per [RFC 3987 Section 6.5](#rfc3987)
1098-
and [RFC 3986 section 5](#rfc3986).
1098+
content), the base IRI is that determined per [RFC 3987 Section 6.5](https://www.rfc-editor.org/info/rfc3987)
1099+
and [RFC 3986 section 5](https://www.rfc-editor.org/info/rfc3986).
10991100

11001101
If no source is known, or no IRI scheme is known for the source, a suitable
11011102
implementation-specific default IRI MAY be used as described in [RFC 3987
1102-
Section 6.5](#rfc3987) and [RFC 3986 Section 5.1.4](#rfc3986). It is RECOMMENDED
1103+
Section 6.5](https://www.rfc-editor.org/info/rfc3987) and [RFC 3986 Section 5.1.4](https://www.rfc-editor.org/info/rfc3986). It is RECOMMENDED
11031104
that implementations document any default base IRI that they assume.
11041105

11051106
If a schema object is embedded in a document of another media type, then the
@@ -1151,7 +1152,7 @@ expect such features to be interoperable across implementations.
11511152
Schemas can be identified by any IRI that has been given to them, including a
11521153
JSON Pointer or their IRI given directly by `$id`. In all cases, dereferencing a
11531154
`$ref` reference involves first resolving its value as a IRI reference against
1154-
the current base IRI per [RFC 3986](#rfc3986).
1155+
the current base IRI per [RFC 3986](https://www.rfc-editor.org/info/rfc3986).
11551156

11561157
If the resulting IRI identifies a schema within the current document, or within
11571158
another schema document that has been made available to the implementation, then
@@ -1423,24 +1424,24 @@ all annotation results), would result in a resolution failure.
14231424
JSON has been adopted widely by HTTP servers for automated APIs and robots. This
14241425
section describes how to enhance processing of JSON documents in a more RESTful
14251426
manner when used with protocols that support media types and [Web
1426-
linking](#rfc8288).
1427+
linking](https://www.rfc-editor.org/info/rfc8288).
14271428

14281429
##### Linking to a Schema
14291430

14301431
It is RECOMMENDED that instances described by a schema provide a link to a
14311432
downloadable JSON Schema using the link relation "describedby", as defined by
1432-
[Linked Data Protocol 1.0, section 8.1](#w3crec-ldp-20150226).
1433+
[Linked Data Protocol 1.0, section 8.1](https://www.w3.org/TR/2015/REC-ldp-20150226).
14331434

14341435
In HTTP, such links can be attached to any response using the [Link
1435-
header](#rfc8288). An example of such a header would be:
1436+
header](https://www.rfc-editor.org/info/rfc8288). An example of such a header would be:
14361437

14371438
```
14381439
Link: <https://example.com/my-hyper-schema>; rel="describedby"
14391440
```
14401441

14411442
##### Usage Over HTTP
14421443

1443-
When used for hypermedia systems over a network, [HTTP](#rfc7231) is frequently
1444+
When used for hypermedia systems over a network, [HTTP](https://www.rfc-editor.org/info/rfc7231) is frequently
14441445
the protocol of choice for distributing schemas. Misbehaving clients can pose
14451446
problems for server maintainers if they pull a schema over the network more
14461447
frequently than necessary, when it's instead possible to cache a schema for a
@@ -1954,7 +1955,7 @@ SHOULD use the terms defined by this document to do so.
19541955
## Security Considerations {#security}
19551956

19561957
Both schemas and instances are JSON values. As such, all security considerations
1957-
defined in [RFC 8259](#rfc8259) apply.
1958+
defined in [RFC 8259](https://www.rfc-editor.org/info/rfc8259) apply.
19581959

19591960
Instances and schemas are both frequently written by untrusted third parties, to
19601961
be deployed on public Internet servers. Implementations should take care that
@@ -1993,7 +1994,7 @@ Subtype name:: schema+json
19931994
Required parameters:: N/A
19941995

19951996
Encoding considerations:: Encoding considerations are identical to those
1996-
specified for the `application/json` media type. See [JSON](#rfc8259).
1997+
specified for the `application/json` media type. See [JSON](https://www.rfc-editor.org/info/rfc8259).
19971998

19981999
Security considerations:: See {{security}} above.
19992000

@@ -2014,7 +2015,7 @@ Subtype name:: schema-instance+json
20142015
Required parameters:: N/A
20152016

20162017
Encoding considerations:: Encoding considerations are identical to those
2017-
specified for the `application/json` media type. See [JSON](#rfc8259).
2018+
specified for the `application/json` media type. See [JSON](https://www.rfc-editor.org/info/rfc8259).
20182019

20192020
Security considerations:: See {{security}} above.
20202021

@@ -2023,116 +2024,6 @@ Interoperability considerations:: See Sections [6.2](#language),
20232024

20242025
Fragment identifier considerations:: See {{fragments}}
20252026

2026-
## References
2027-
2028-
### Normative References
2029-
2030-
#### [RFC2119] {#rfc2119}
2031-
2032-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14,
2033-
RFC 2119, DOI 10.17487/RFC2119, March 1997,
2034-
<<https://www.rfc-editor.org/info/rfc2119>>.
2035-
2036-
#### [RFC3986] {#rfc3986}
2037-
2038-
Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier
2039-
(URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005,
2040-
<<https://www.rfc-editor.org/info/rfc3986>>.
2041-
2042-
#### [RFC3987] {#rfc3987}
2043-
2044-
Duerst, M. and M. Suignard, "Internationalized Resource Identifiers (IRIs)", RFC
2045-
3987, DOI 10.17487/RFC3987, January 2005,
2046-
<<https://www.rfc-editor.org/info/rfc3987>>.
2047-
2048-
#### [RFC6839] {#rfc6839}
2049-
2050-
Hansen, T. and A. Melnikov, "Additional Media Type Structured Syntax Suffixes",
2051-
RFC 6839, DOI 10.17487/RFC6839, January 2013,
2052-
<<https://www.rfc-editor.org/info/rfc6839>>.
2053-
2054-
#### [RFC6901] {#rfc6901}
2055-
2056-
Bryan, P., Ed., Zyp, K., and M. Nottingham, Ed., "JavaScript Object Notation
2057-
(JSON) Pointer", RFC 6901, DOI 10.17487/RFC6901, April 2013,
2058-
<<https://www.rfc-editor.org/info/rfc6901>>.
2059-
2060-
#### [RFC8259] {#rfc8259}
2061-
2062-
Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format",
2063-
STD 90, RFC 8259, DOI 10.17487/RFC8259, December 2017,
2064-
<<https://www.rfc-editor.org/info/rfc8259>>.
2065-
2066-
#### [W3C.REC-ldp-20150226] {#w3crec-ldp-20150226}
2067-
2068-
Malhotra, A., Ed., Arwe, J., Ed., and S. Speicher, Ed., "Linked Data Platform
2069-
1.0", W3C REC REC-ldp-20150226, W3C REC-ldp-20150226, 26 February 2015,
2070-
<<https://www.w3.org/TR/2015/REC-ldp-20150226/>>.
2071-
2072-
#### [ecma262] {#ecma262}
2073-
2074-
"ECMA-262, 11th edition specification", June 2020,
2075-
<<https://www.ecma-international.org/ecma-262/11.0/index.html>>.
2076-
2077-
### Informative References
2078-
2079-
#### [RFC6596] {#rfc6596}
2080-
2081-
Ohye, M. and J. Kupke, "The Canonical Link Relation", RFC 6596, DOI
2082-
10.17487/RFC6596, April 2012, <<https://www.rfc-editor.org/info/rfc6596>>.
2083-
2084-
#### [RFC7049] {#rfc7049}
2085-
2086-
Bormann, C. and P. Hoffman, "Concise Binary Object Representation (CBOR)", RFC
2087-
7049, DOI 10.17487/RFC7049, October 2013,
2088-
<<https://www.rfc-editor.org/info/rfc7049>>.
2089-
2090-
#### [RFC7231] {#rfc7231}
2091-
2092-
Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1):
2093-
Semantics and Content", RFC 7231, DOI 10.17487/RFC7231, June 2014,
2094-
<<https://www.rfc-editor.org/info/rfc7231>>.
2095-
2096-
#### [RFC8288] {#rfc8288}
2097-
2098-
Nottingham, M., "Web Linking", RFC 8288, DOI 10.17487/RFC8288, October 2017,
2099-
<<https://www.rfc-editor.org/info/rfc8288>>.
2100-
2101-
#### [W3C.WD-fragid-best-practices-20121025]
2102-
{#w3cwd-fragid-best-practices-20121025}
2103-
2104-
Tennison, J., Ed., "Best Practices for Fragment Identifiers and Media Type
2105-
Definitions", W3C WD WD-fragid-best-practices-20121025, W3C
2106-
WD-fragid-best-practices-20121025, 25 October 2012,
2107-
<<https://www.w3.org/TR/2012/WD-fragid-best-practices-20121025/>>.
2108-
2109-
#### [W3C.REC-xptr-framework-20030325] {#w3crec-xptr-framework-20030325}
2110-
2111-
Maler, E., Ed., Marsh, J., Ed., Walsh, N., Ed., and P. Grosso, Ed., "XPointer
2112-
Framework", W3C REC REC-xptr-framework-20030325, W3C
2113-
REC-xptr-framework-20030325, 25 March 2003,
2114-
<<https://www.w3.org/TR/2003/REC-xptr-framework-20030325/>>.
2115-
2116-
#### [json-schema-validation] {#json-schema-validation}
2117-
2118-
Wright, A., Andrews, H., and B. Hutton, "JSON Schema Validation: A Vocabulary
2119-
for Structural Validation of JSON", Work in Progress, Internet-Draft,
2120-
draft-bhutton-json-schema-validation-01, June 2022,
2121-
<<https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01>>.
2122-
2123-
#### [json-hyper-schema] {#json-hyper-schema}
2124-
2125-
Andrews, H. and A. Wright, "JSON Hyper-Schema: A Vocabulary for Hypermedia
2126-
Annotation of JSON", Work in Progress, Internet-Draft,
2127-
draft-handrews-json-schema-hyperschema-02, November 2017,
2128-
<<https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02>>.
2129-
2130-
#### [xml-names] {#xml-names}
2131-
2132-
Bray, T., Ed., Hollander, D., Ed., Layman, A., Ed., and R. Tobin, Ed.,
2133-
"Namespaces in XML 1.1 (Second Edition)", August 2006,
2134-
<<http://www.w3.org/TR/2006/REC-xml-names11-20060816>>.
2135-
21362027
## %appendix% Schema identification examples {#idexamples}
21372028

21382029
Consider the following schema, which shows `$id` being used to identify both the
@@ -2162,7 +2053,7 @@ name fragment identifiers.
21622053
```
21632054

21642055
The schemas at the following locations (indicated by plain
2165-
[JSON Pointers](#rfc6901) relative to the root document) have the following base
2056+
[JSON Pointers](https://www.rfc-editor.org/info/rfc6901) relative to the root document) have the following base
21662057
IRIs, and are identifiable by any listed IRI in accordance with {{fragments}}
21672058
and {{embedded}} above.
21682059

0 commit comments

Comments
 (0)