       |> Enum.reject(&(not &1 in Keyword.get(opts, :only, @http_verbs)))
       |> Enum.reject(&(&1 in Keyword.get(opts, :except, [])))
 
-    Enum.map selected_verbs, &generate_api(&1, Keyword.get(opts, :docs, true))
-  end
-
-  defp generate_api(method, docs) when method in [:post, :put, :patch] do
-    quote do
-      if unquote(docs) do
+    Enum.map selected_verbs, &generate_api(&1, Keyword.get(opts, :private))
+  end
+
+  defp generate_api(method, private) when method in [:post, :put, :patch] do
+    quote do
+      unless unquote(private) do
         @doc """
         Perform a #{unquote(method |> to_string |> String.upcase)} request.
         See `request/1` or `request/2` for options definition.

            iex> ExampleApi.#{unquote(method)}("/users", %{name: "Jon"}, query: [scope: "admin"])
        """
        @spec unquote(method)(Tesla.Env.client, Tesla.Env.url, Tesla.Env.body) :: Tesla.Env.t
      else
        @doc false
      end
      def unquote(method)(client, url, body) when is_function(client) do
        request(client, method: unquote(method), url: url, body: body)
      end
      if unquote(docs) do
        @spec unquote(method)(Tesla.Env.url, Tesla.Env.body, [option]) :: Tesla.Env.t
      else
        @doc false
      end
      def unquote(method)(url, body, options) do
        request([method: unquote(method), url: url, body: body] ++ options)
      end

      if unquote(docs) do
        @doc """
        Perform a #{unquote(method |> to_string |> String.upcase)} request.
        See `request/1` or `request/2` for options definition.

            iex> ExampleApi.#{unquote(method)}("/users", %{name: "Jon"})
        """
        @spec unquote(method)(Tesla.Env.url, Tesla.Env.body) :: Tesla.Env.t
      end
      dynamic_def unquote(private), unquote(method)(url, body) do
        request(method: unquote(method), url: url, body: body)
      end
    end
  end

  defp generate_api(method, private) when method in [:head, :get, :delete, :trace, :options] do
    quote do
      unless unquote(private) do
        @doc """
        Perform a #{unquote(method |> to_string |> String.upcase)} request.
        See `request/1` or `request/2` for options definition.
