Skip to content

Commit 7f781d9

Browse files
authored
Merge pull request #274 from cwacek/fix/referencing
bugfix: Update the way specifications are retrieved.
2 parents 72e2ebf + f58d88c commit 7f781d9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

python_jsonschema_objects/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,14 @@ def file_and_memory_handler(uri):
125125
DeprecationWarning,
126126
)
127127
for uri, contents in resolved.items():
128+
from referencing.jsonschema import specification_with
129+
130+
specification = specification_with(
131+
specification_uri or self.schema["$schema"]
132+
)
128133
self.registry = self.registry.with_resource(
129134
"memory:" + uri,
130-
referencing.Resource.from_contents(
131-
contents, specification_uri or self.schema["$schema"]
132-
),
135+
referencing.Resource.from_contents(contents, specification),
133136
)
134137

135138
validatorClass = jsonschema.validators.validator_for(

0 commit comments

Comments
 (0)