Skip to content

Commit 1630506

Browse files
committed
Add referencing.jsonschema.SchemaResource.
Mirrors the other JSON Schema specialized type aliases.
1 parent 9321869 commit 1630506

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/changes.rst

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog
33
=========
44

5+
v0.33.0
6+
-------
7+
8+
* Add a ``referencing.jsonschema.SchemaResource`` type alias to go along with the other JSON Schema specialized types.
9+
510
v0.32.1
611
-------
712

referencing/jsonschema.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
#: A JSON Schema of any kind
2121
Schema = Union[bool, ObjectSchema]
2222

23+
#: A Resource whose contents are JSON Schemas
24+
SchemaResource = Resource[Schema]
25+
2326
#: A JSON Schema Registry
2427
SchemaRegistry = Registry[Schema]
2528

@@ -588,7 +591,7 @@ class DynamicAnchor:
588591
"""
589592

590593
name: str
591-
resource: Resource[Schema]
594+
resource: SchemaResource
592595

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

0 commit comments

Comments
 (0)