       remote: remote,
       url: url
     }
-  end
-
-  def new(%URI{} = uri) do
-    raise "deprecated"
-    %Ref{pointer: URI.to_string(uri)}
-  end
-
-  def new(opts) when is_list(opts) do
-    raise "deprecated"
-    struct(Ref, opts)
   end
 
   def validate(ref, value, opts) do

        nil -> {:error, :not_found}
        value -> do_get(steps, value)
      end
    end
  end

  defp get_schema(schema) do
    case schema do
      %Xema{content: schema} -> schema
      %Schema{} = schema -> schema
    end
  end



  defp do_get(_, nil), do: {:error, :not_found}

  defp do_get(pointer, %Xema{} = xema)
    when pointer in [nil, "", "#"],do: {:ok, xema.content}

  defp do_get(pointer, %Xema{} = xema), do: do_get(pointer, xema.content)

