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