File tree Expand file tree Collapse file tree 5 files changed +20
-0
lines changed
gapic-generator/lib/gapic/schema
shared/output/gapic/templates/showcase/lib/google/showcase/v1beta1 Expand file tree Collapse file tree 5 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,18 @@ def full_name
347347 @address . join "."
348348 end
349349
350+ # @private
351+ # This is an override that adds mention of the client's service and API
352+ # version if the service has a google.api.api_version set.
353+ def docs_leading_comments disable_xrefs : false , transport : nil
354+ str = super ( disable_xrefs : disable_xrefs , transport : transport )
355+ if !str || api_version . nil? || api_version . empty?
356+ return str
357+ end
358+
359+ "#{ str . strip } \n \n This client uses #{ name } version #{ api_version } ."
360+ end
361+
350362 # @!method name
351363 # @return [String] the unqualified name of the service.
352364 # @!method options
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ module V1beta1
4747 # 'x-goog-request-params' metadata key on any method to have the values
4848 # echoed in the response headers.
4949 #
50+ # This client uses Echo version v1_20240408.
51+ #
5052 # @example Load this service and instantiate a gRPC client
5153 #
5254 # require "google/showcase/v1beta1/echo"
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ module Echo
4444 # 'x-goog-request-params' metadata key on any method to have the values
4545 # echoed in the response headers.
4646 #
47+ # This client uses Echo version v1_20240408.
48+ #
4749 class Client
4850 # @private
4951 API_VERSION = "v1_20240408"
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ module V1beta1
4747 # 'x-goog-request-params' metadata key on any method to have the values
4848 # echoed in the response headers.
4949 #
50+ # This client uses Echo version v1_20240408.
51+ #
5052 # To load this service and instantiate a REST client:
5153 #
5254 # require "google/showcase/v1beta1/echo/rest"
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ module Rest
4646 # 'x-goog-request-params' metadata key on any method to have the values
4747 # echoed in the response headers.
4848 #
49+ # This client uses Echo version v1_20240408.
50+ #
4951 class Client
5052 # @private
5153 API_VERSION = "v1_20240408"
You can’t perform that action at this time.
0 commit comments