From 7ba5f2306732c7affeb1cf6f5c2b28ce46f30c70 Mon Sep 17 00:00:00 2001 From: Alexander Marychev Date: Sat, 27 Apr 2024 13:44:29 +0300 Subject: [PATCH] Revert auto-resolve part logic --- lib/json_skooma/keywords/core/ref.rb | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/lib/json_skooma/keywords/core/ref.rb b/lib/json_skooma/keywords/core/ref.rb index f686f12..a4cbe9d 100644 --- a/lib/json_skooma/keywords/core/ref.rb +++ b/lib/json_skooma/keywords/core/ref.rb @@ -7,7 +7,6 @@ class Ref < Base self.key = "$ref" def resolve - add_remote_source if need_to_adding? @ref_schema = parent_schema.resolve_ref(json) end @@ -15,22 +14,6 @@ def evaluate(instance, result) @ref_schema.evaluate(instance, result) result.ref_schema = @ref_schema end - - def add_remote_source - parent_schema.registry.add_source( - pathname.dirname.to_s + "/", - JSONSkooma::Sources::Remote.new(json) - ) - end - - def need_to_adding? - json.start_with?("http") && - parent_schema.registry.instance_variable_get("@uri_sources").keys.none?{ |k| json.include?(k) } - end - - def pathname - Pathname.new(json) - end end end end