def resolve_json_reference(reference, deep_dereference: false, base_path: nil)
      # Try to extract JSON from file or webpage
      reference = join_paths(base_path, reference)
      resolved_reference = load_json(reference)
      if deep_dereference == true
        dereference_descriptor(resolved_reference, base_path: base_path)
      else
        resolved_reference
      end
    end
def resolve_json_reference(reference, deep_dereference: false, base_path: nil)
      # Try to extract JSON from file or webpage
      reference = join_paths(base_path, reference)
      resolved_reference = load_json(reference)
      if deep_dereference == true
        dereference_descriptor(resolved_reference, base_path: base_path)
      else
        resolved_reference
      end
    end
Resolve a reference to a JSON file; Returns the JSON as hash
 Raises JSON::ParserError, OpenURI::HTTPError, SocketError or TypeError for invalid references