Skip to content

Commit 2028120

Browse files
committed
Add a few additional interlinks to the JSON Schema specification.
1 parent 32565f9 commit 2028120

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
An implementation-agnostic implementation of JSON reference resolution.
22

3-
In other words, a way for e.g. JSON Schema tooling to resolve the ``$ref`` keyword across all drafts without needing to implement support themselves.
3+
In other words, a way for e.g. JSON Schema tooling to resolve the :kw:`$ref` keywords across all drafts without needing to implement support themselves.
44

55
This library is meant for use both by implementers of JSON referencing-related tooling -- like JSON Schema implementations supporting the :kw:`$ref` keyword -- as well as by end-users using said implementations who wish to then configure sets of resources (like schemas) for use at runtime.
66

docs/intro.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ There are a few different methods you can use to populate registries with resour
6161
Which one you want to use depends on things like:
6262

6363
* do you already have an instance of `referencing.Resource`, or are you creating one out of some loaded JSON?
64-
If not, does the JSON have some sort of identifier that can be used to determine which specification it belongs to (e.g. the JSON Schema ``$schema`` keyword)?
65-
* does your resource have an internal ID (e.g. the JSON Schema ``$id`` keyword)?
64+
If not, does the JSON have some sort of identifier that can be used to determine which specification it belongs to (e.g. the JSON Schema :kw:`$schema` keyword)?
65+
* does your resource have an internal ID (e.g. the JSON Schema :kw:`$id` keyword)?
6666
* do you have additional (external) URIs you want to refer to the same resource as well?
6767
* do you have one resource to add or many?
6868

@@ -114,7 +114,7 @@ Let's check by using `Registry.contents`, which takes a URI and should show us t
114114

115115
{'$id': 'urn:example:my-schema', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'type': 'integer'}
116116

117-
If your schema did *not* have a ``$schema`` keyword, you'd get an error:
117+
If your schema did *not* have a :kw:`$schema` keyword, you'd get an error:
118118

119119
.. testcode::
120120

@@ -166,7 +166,7 @@ E.g., an equivalent way to create the above resource is:
166166

167167
True
168168

169-
If your resource doesn't contain an ``$id`` keyword, you'll get a different error if you attempt to add it to a registry:
169+
If your resource doesn't contain an :kw:`$id` keyword, you'll get a different error if you attempt to add it to a registry:
170170

171171
.. testcode::
172172

referencing/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class NoInternalID(Exception):
3939
"""
4040
A resource has no internal ID, but one is needed.
4141
42-
E.g. in modern JSON Schema drafts, this is the ``$id`` keyword.
42+
E.g. in modern JSON Schema drafts, this is the :kw:`$id` keyword.
4343
4444
One might be needed if a resource was to-be added to a registry but no
4545
other URI is available, and the resource doesn't declare its canonical URI.

0 commit comments

Comments
 (0)