Skip to content

Commit

Permalink
Include overload tag into the client initalization documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jterapin committed Feb 11, 2025
1 parent 3fa7430 commit 0519edd
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 72 deletions.
3 changes: 2 additions & 1 deletion gems/smithy/lib/smithy/templates/client/client.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ module <%= module_name %>
add_plugin(<%= plugin_class %>)
<% end -%>

# @overload initialize(options)
<% docstrings.each do |docstring| -%>
# <%= docstring %>
# <%= docstring %>
<% end -%>
def initialize(*args)
super
Expand Down
143 changes: 72 additions & 71 deletions projections/weather/lib/weather/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,77 +22,78 @@ class Client < Smithy::Client::Base
add_plugin(Smithy::Client::Plugins::RaiseResponseErrors)
add_plugin(Smithy::Client::Plugins::ResponseTarget)

# @option options [String] :endpoint
# Custom Endpoint
# @option options [Weather::EndpointProvider] :endpoint_provider
# The endpoint provider used to resolve endpoints. Any object that responds to
# `#resolve_endpoint(parameters)`.
# @option options [String] :http_ca_file
# The path to a CA certification file in PEM format. Defaults to `nil` which uses
# the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-ca_file
# @option options [String] :http_ca_path
# The path of to CA directory containing certification files in PEM format. Defaults to
# `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-ca_path
# @option options [OpenSSL::X509::Certificate] :http_cert
# Sets the OpenSSL::X509::Certificate object to be used for client certification. Defaults
# to `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-cert
# @option options [OpenSSL::X509::Store] :http_cert_store
# Sets the OpenSSL::X509::Store to be used for verifying peer certificate. Defaults to
# `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-cert_store
# @option options [Numeric] :http_continue_timeout
# Sets the continue timeout value, which is the number of seconds to wait for an
# expected 100 Continue response. If the HTTP object does not receive a response
# in this many seconds it sends the request body. Defaults to `nil` which uses the
# Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-continue_timeout
# @option options [Boolean] :http_debug_output
# When `true`, Net::HTTP debug output will be sent to the configured logger.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#method-i-set_debug_output
# @option options [Numeric] :http_keep_alive_timeout
# The number of seconds to keep the connection open after a request is sent. If a
# new request is made during the given interval, the still-open connection is used;
# otherwise the connection will have been closed and a new connection is opened.
# Defaults to `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-keep_alive_timeout
# @option options [OpenSSL::PKey::RSA, OpenSSL::PKey::DSA] :http_key
# Sets the OpenSSL::PKey object to be used for client private key. Defaults to `nil` which
# uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-key
# @option options [Numeric] :http_open_timeout
# The number of seconds to wait for a connection to open. If the connection is not
# made in the given interval, an exception is raised. Defaults to `nil` which uses
# the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-open_timeout
# @option options [URI::HTTP, String] :http_proxy
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
# @option options [Numeric] :http_read_timeout
# The number of seconds to wait for one block to be read (via one read(2) call).
# Defaults to `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-read_timeout
# @option options [Numeric] :http_ssl_timeout
# Sets the SSL timeout seconds. Defaults to `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-ssl_timeout
# @option options [Integer] :http_verify_mode (OpenSSL::SSL::VERIFY_PEER)
# Sets the verify mode for SSL. Defaults to `OpenSSL::SSL::VERIFY_PEER`.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-verify_mode
# @option options [Numeric] :http_write_timeout
# The number of seconds to wait for one block to be written (via one write(2) call).
# Defaults to `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-write_timeout
# @option options [Symbol] :log_level (info)
# The log level to send messages to the logger at.
# @option options [Logger] :logger
# The Logger instance to send log messages to. If this option is not set,
# logging is disabled.
# @option options [Boolean] :raise_response_errors (true)
# When `true`, response errors are raised. When `false`, the error is placed on the
# output in the {Smithy::Client::Output#error error accessor}.
# @option options [Boolean] :validate_params (true)
# When `true`, request parameters are validated before sending the request.
# @overload initialize(options)
# @option options [String] :endpoint
# Custom Endpoint
# @option options [Weather::EndpointProvider] :endpoint_provider
# The endpoint provider used to resolve endpoints. Any object that responds to
# `#resolve_endpoint(parameters)`.
# @option options [String] :http_ca_file
# The path to a CA certification file in PEM format. Defaults to `nil` which uses
# the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-ca_file
# @option options [String] :http_ca_path
# The path of to CA directory containing certification files in PEM format. Defaults to
# `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-ca_path
# @option options [OpenSSL::X509::Certificate] :http_cert
# Sets the OpenSSL::X509::Certificate object to be used for client certification. Defaults
# to `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-cert
# @option options [OpenSSL::X509::Store] :http_cert_store
# Sets the OpenSSL::X509::Store to be used for verifying peer certificate. Defaults to
# `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-cert_store
# @option options [Numeric] :http_continue_timeout
# Sets the continue timeout value, which is the number of seconds to wait for an
# expected 100 Continue response. If the HTTP object does not receive a response
# in this many seconds it sends the request body. Defaults to `nil` which uses the
# Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-continue_timeout
# @option options [Boolean] :http_debug_output
# When `true`, Net::HTTP debug output will be sent to the configured logger.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#method-i-set_debug_output
# @option options [Numeric] :http_keep_alive_timeout
# The number of seconds to keep the connection open after a request is sent. If a
# new request is made during the given interval, the still-open connection is used;
# otherwise the connection will have been closed and a new connection is opened.
# Defaults to `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-keep_alive_timeout
# @option options [OpenSSL::PKey::RSA, OpenSSL::PKey::DSA] :http_key
# Sets the OpenSSL::PKey object to be used for client private key. Defaults to `nil` which
# uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-key
# @option options [Numeric] :http_open_timeout
# The number of seconds to wait for a connection to open. If the connection is not
# made in the given interval, an exception is raised. Defaults to `nil` which uses
# the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-open_timeout
# @option options [URI::HTTP, String] :http_proxy
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
# @option options [Numeric] :http_read_timeout
# The number of seconds to wait for one block to be read (via one read(2) call).
# Defaults to `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-read_timeout
# @option options [Numeric] :http_ssl_timeout
# Sets the SSL timeout seconds. Defaults to `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-ssl_timeout
# @option options [Integer] :http_verify_mode (OpenSSL::SSL::VERIFY_PEER)
# Sets the verify mode for SSL. Defaults to `OpenSSL::SSL::VERIFY_PEER`.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-verify_mode
# @option options [Numeric] :http_write_timeout
# The number of seconds to wait for one block to be written (via one write(2) call).
# Defaults to `nil` which uses the Net::HTTP default value.
# @see https://docs.ruby-lang.org/en/master/Net/HTTP.html#attribute-i-write_timeout
# @option options [Symbol] :log_level (info)
# The log level to send messages to the logger at.
# @option options [Logger] :logger
# The Logger instance to send log messages to. If this option is not set,
# logging is disabled.
# @option options [Boolean] :raise_response_errors (true)
# When `true`, response errors are raised. When `false`, the error is placed on the
# output in the {Smithy::Client::Output#error error accessor}.
# @option options [Boolean] :validate_params (true)
# When `true`, request parameters are validated before sending the request.
def initialize(*args)
super
end
Expand Down

0 comments on commit 0519edd

Please sign in to comment.