             iex> myclient |> ExampleApi.#{unquote(method)}("/users", %{name: "Jon"}, query: [scope: "admin"])
         """
         @spec unquote(method)(Tesla.Env.client, Tesla.Env.url, Tesla.Env.body, [option]) :: Tesla.Env.t
-      else
-        @doc false
-      end
-      def unquote(method)(client, url, body, options) when is_function(client) do
+      end
+      dynamic_def unquote(private), unquote(method)(client, url, body, options) when is_function(client) do
         request(client, [method: unquote(method), url: url, body: body] ++ options)
       end
 
-      if unquote(docs) 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> myclient |> ExampleApi.#{unquote(method)}("/users", query: [page: 1])
        """
        @spec unquote(method)(Tesla.Env.client, Tesla.Env.url, [option]) :: Tesla.Env.t
      else
        @doc false
      end
      def unquote(method)(client, url, options) when is_function(client) do
        request(client, [method: unquote(method), url: url] ++ 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", query: [page: 1])
        """
        @spec unquote(method)(Tesla.Env.client, Tesla.Env.url) :: Tesla.Env.t
      end
      dynamic_def unquote(private), unquote(method)(client, url) when is_function(client) do
        request(client, method: unquote(method), url: url)
      end
      unless unquote(private) do
        @spec unquote(method)(Tesla.Env.url, [option]) :: Tesla.Env.t
      end
      dynamic_def unquote(private), unquote(method)(url, options) do
        request([method: unquote(method), url: url] ++ options)
      end

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