From 4716c212c955100fafd83f6e6cc92199f7f7bdb5 Mon Sep 17 00:00:00 2001 From: Elizabeth Paige Harper Date: Tue, 3 Jun 2025 11:27:46 -0400 Subject: [PATCH] Update intermediate_representation.py --- json_schema_for_humans/schema/intermediate_representation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/json_schema_for_humans/schema/intermediate_representation.py b/json_schema_for_humans/schema/intermediate_representation.py index 715949e1..4782d36f 100644 --- a/json_schema_for_humans/schema/intermediate_representation.py +++ b/json_schema_for_humans/schema/intermediate_representation.py @@ -269,6 +269,8 @@ def _resolve_ref( referenced_schema_path = uri_part elif uri_part.startswith("file:"): referenced_schema_path = os.path.realpath(os.path.join(os.path.dirname(current_node.file), uri_part[5:])) + elif current_node.file.startswith("http"): + referenced_schema_path = urllib.parse.urljoin(current_node.file, uri_part) else: referenced_schema_path = os.path.realpath(os.path.join(os.path.dirname(current_node.file), uri_part)) elif current_node.file.startswith("http"):