Skip to content

Commit

Permalink
Spell 'meta-schema' consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
marksparkza committed May 21, 2023
1 parent 35a712d commit 9a19b80
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Bug Fixes:

* Non-scalar annotation values are now fully unwrapped from the JSON class

Documentation:

* Spell 'meta-schema' consistently in tutorials and examples


v0.10.2 (2023-04-20)
--------------------
Experimental:
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorial/jsonschema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ For boolean schemas and empty schemas, it's as simple as:
>>> empty_schema = JSONSchema({})

Creating a :class:`~jschon.jsonschema.JSONSchema` object from any non-empty
:class:`Mapping`, however, requires that we specify a metaschema. Here's a
:class:`Mapping`, however, requires that we specify a meta-schema. Here's a
very basic example of a schema that simply ensures that a JSON value represents
an integer:

Expand All @@ -62,7 +62,7 @@ an integer:
The `metaschema_uri` parameter resolves to a :class:`~jschon.vocabulary.Metaschema`
object, which provides the new :class:`~jschon.jsonschema.JSONSchema` instance
with :class:`~jschon.vocabulary.Keyword` classes for each of its keywords. The
metaschema URI may be parameterized, as above, or it may be provided using the
meta-schema URI may be parameterized, as above, or it may be provided using the
``"$schema"`` keyword:

>>> int_schema = JSONSchema({
Expand Down Expand Up @@ -133,7 +133,7 @@ any :class:`PathLike` object; for example:

Both :meth:`~jschon.json.JSON.loads` and :meth:`~jschon.json.JSON.loadf` accept
keyword arguments that are passed through to the :class:`~jschon.jsonschema.JSONSchema`
constructor, in case we need to parameterize the metaschema URI, the schema URI, or
constructor, in case we need to parameterize the meta-schema URI, the schema URI, or
any other :class:`~jschon.jsonschema.JSONSchema` constructor argument:

>>> num_schema = JSONSchema.loads(schema_text, metaschema_uri=URI("https://json-schema.org/draft/2020-12/schema"))
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_keyword.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def evaluate(self, instance: JSON, result: Result) -> None:
"enumRef": "https://example.com/remote-enum-colours",
})

# validate the schema against its metaschema
# validate the schema against its meta-schema
schema_validity = schema.validate()
print(f'Schema validity check: {schema_validity.valid}')

Expand Down

0 comments on commit 9a19b80

Please sign in to comment.