Skip to content

Commit

Permalink
Add referencing.jsonschema.SchemaResource.
Browse files Browse the repository at this point in the history
Mirrors the other JSON Schema specialized type aliases.
  • Loading branch information
Julian committed Jan 28, 2024
1 parent 9321869 commit 1630506
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
=========

v0.33.0
-------

* Add a ``referencing.jsonschema.SchemaResource`` type alias to go along with the other JSON Schema specialized types.

v0.32.1
-------

Expand Down
5 changes: 4 additions & 1 deletion referencing/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#: A JSON Schema of any kind
Schema = Union[bool, ObjectSchema]

#: A Resource whose contents are JSON Schemas
SchemaResource = Resource[Schema]

#: A JSON Schema Registry
SchemaRegistry = Registry[Schema]

Expand Down Expand Up @@ -588,7 +591,7 @@ class DynamicAnchor:
"""

name: str
resource: Resource[Schema]
resource: SchemaResource

def resolve(self, resolver: _Resolver[Schema]) -> _Resolved[Schema]:
"""
Expand Down

0 comments on commit 1630506

Please sign in to comment.