Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jsonschema to keep up with other tools #967

Merged
merged 3 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def find_version(*file_paths):
"boto3>=1.10.20",
"Jinja2>=3.1.2",
"markupsafe>=2.1.0",
"jsonschema>=3.0.1,<4.0",
"jsonschema>=4.0.0,<5.0",
"pytest>=4.5.0",
"pytest-random-order>=1.0.4",
"pytest-localserver>=0.5.0",
Expand Down
7 changes: 7 additions & 0 deletions src/rpdk/core/jsonutils/inliner.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ def __init__(self, base_uri, schema):
def _walk_schema(self):
self._walk(self.schema, (BASE,))

def resolve(self, ref):
"""
Resolve the given reference.
"""
url = self._urljoin_cache(self.resolution_scope, ref)
return url, self._remote_cache(url)

def _walk(self, obj, old_path):
if isinstance(obj, str):
return # very common, easier to debug this case
Expand Down
3 changes: 1 addition & 2 deletions src/rpdk/core/jsonutils/renamer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from itertools import count

from jsonschema.compat import urldefrag
from urllib.parse import urldefrag

from .pointer import fragment_decode

Expand Down