diff --git a/src/rpdk/core/jsonutils/inliner.py b/src/rpdk/core/jsonutils/inliner.py index 149f5fce..33bae9be 100644 --- a/src/rpdk/core/jsonutils/inliner.py +++ b/src/rpdk/core/jsonutils/inliner.py @@ -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 diff --git a/src/rpdk/core/jsonutils/renamer.py b/src/rpdk/core/jsonutils/renamer.py index 3bec22a6..e29ed6ca 100644 --- a/src/rpdk/core/jsonutils/renamer.py +++ b/src/rpdk/core/jsonutils/renamer.py @@ -1,5 +1,5 @@ from itertools import count -from urllib.parse import urldefrag +from urllib.parse import unquote, urldefrag from .pointer import fragment_decode