     Regex.match?(regex, string)
   end
 
-  def is_uri_template_path?(_), do: false
+  def uri_template_path?(_), do: false
 
   @doc """
   Checks if the value is a valid uri qurey.
 
-  See also `Xema.Format.is_uri?/1`.
-  """
-  @spec is_uri_query?(any) :: boolean
-  def is_uri_query?(string) when is_binary(string) do
+  See also `Xema.Format.uri?/1`.
+  """
+  @spec uri_query?(any) :: boolean
+  def uri_query?(string) when is_binary(string) do
     regex = ~r/
       (?(DEFINE)
         (?<pct_encoded> %[[:xdigit:]][[:xdigit:]] )

    Regex.match?(regex, string)
  end

  def is_ipv6?(_), do: true

  #
  # JSON Pointer

  ```
  Wikipedia: [Uniform Resource Identifier](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier)
  """
  @spec uri?(any) :: boolean
  def uri?(string), do: do_uri?(string, :uri)

  @doc """
  Checks if the value is a valid uri reference.
  """
  @spec uri_reference?(any) :: boolean
  def uri_reference?(string), do: do_uri?(string, :uri_reference)

  @doc """
  Checks if the value is a valid uri template.
  """
  def uri_template?(string), do: do_uri?(string, :uri_template)

  # do_uri?/2 handels:
  #   * uri?
  #   * uri_reference?
  #   * uri_template?

  defp do_uri?(string, type) when is_binary(string),
    do: do_uri?(URI.parse(string), type)

  defp do_uri?(%URI{scheme: nil}, :uri), do: false

  defp do_uri?(%URI{scheme: "mailto", path: path}, _), do: email?(path)

  # credo:disable-for-next-line
  defp do_uri?(%URI{} = uri, :uri_template) do
    (is_nil(uri.host) || host?(uri.host)) &&
      (is_nil(uri.userinfo) || uri_userinfo?(uri.userinfo)) &&
      (is_nil(uri.path) || uri_template_path?(uri.path))
  end

  # credo:disable-for-next-line
  defp do_uri?(%URI{} = uri, _) do
    (is_nil(uri.host) || host?(uri.host)) &&
      (is_nil(uri.userinfo) || uri_userinfo?(uri.userinfo)) &&
      (is_nil(uri.path) || uri_path?(uri.path)) &&
      (is_nil(uri.query) || uri_query?(uri.query)) &&
      (is_nil(uri.fragment) || uri_fragment?(uri.fragment))
  end

  defp do_uri?(_, _), do: false

  @doc """
  Checks if the value is a valid uri user info.

  See also `Xema.Format.uri?/1`.
  """
  @spec uri_userinfo?(any) :: boolean
  def uri_userinfo?(string) when is_binary(string) do
    regex = ~r/
      (?(DEFINE)
        (?<pct_encoded> %[[:xdigit:]][[:xdigit:]] )
