   @type t :: %Xema.Ref{pointer: String.t()}
 
   defstruct pointer: nil,
-            ptr: nil,
             path: nil,
             remote: false,
             url: nil

    {:ok, ref, opts}
  end

  defp get_x(%Ref{remote: true, url: nil, path: path, ptr: pointer}, opts) do
    uri = URI.parse(opts[:id])

    uri =

    with {:ok, schema} <- do_get(pointer, xema), do: {:ok, schema, root: xema}
  end

  defp get_x(%Ref{remote: true, url: url, path: path, pointer: pointer}, opts) do
    uri = Path.join(url, path)

    xema = Map.get(opts[:root].refs, uri)
