Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions gapic-generator/lib/gapic/schema/wrappers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,18 @@ def full_name
@address.join "."
end

# @private
# This is an override that adds mention of the client's service and API
# version if the service has a google.api.api_version set.
def docs_leading_comments disable_xrefs: false, transport: nil
str = super(disable_xrefs: disable_xrefs, transport: transport)
if !str || api_version.nil? || api_version.empty?
return str
end

"#{str.strip}\n\nThis client uses #{name} version #{api_version}."
end

# @!method name
# @return [String] the unqualified name of the service.
# @!method options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ module V1beta1
# 'x-goog-request-params' metadata key on any method to have the values
# echoed in the response headers.
#
# This client uses Echo version v1_20240408.
#
# @example Load this service and instantiate a gRPC client
#
# require "google/showcase/v1beta1/echo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ module Echo
# 'x-goog-request-params' metadata key on any method to have the values
# echoed in the response headers.
#
# This client uses Echo version v1_20240408.
#
class Client
# @private
API_VERSION = "v1_20240408"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ module V1beta1
# 'x-goog-request-params' metadata key on any method to have the values
# echoed in the response headers.
#
# This client uses Echo version v1_20240408.
#
# To load this service and instantiate a REST client:
#
# require "google/showcase/v1beta1/echo/rest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ module Rest
# 'x-goog-request-params' metadata key on any method to have the values
# echoed in the response headers.
#
# This client uses Echo version v1_20240408.
#
class Client
# @private
API_VERSION = "v1_20240408"
Expand Down