gapic-generator 0.45.3 → 0.45.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 271aec2d05b52adb5498c05c65461142789397a22d3b9a99d1d09f1559e8cf4f
4
- data.tar.gz: 16e8bbbf90f2c0eb2174939cc7972fa37552cb807cfd24ecc0d74c9ed252a642
3
+ metadata.gz: e3f7283592167653163c4acebf0950f43eae341db2d41e0a8ff65f5cbad56194
4
+ data.tar.gz: d9680dfecc27af932856241ab1e269044df8d27e33fb662b55649866dbd83554
5
5
  SHA512:
6
- metadata.gz: e46aeb79a605c9395704b0cc14d4b8b540c34c119c9ee7d33178fc8d1a384d91fecfc42e92311e7197e36f9cec7cf21cb85e3a29850256643d348eae6571e8d2
7
- data.tar.gz: 9f953a7d82a33f19a6309b6ca6abdf5da4b0f5bec294f6f1da8b0aadec47466f335a4df091c8021dd87a9596b0a310bdfa006fd617f03af8e167067a76712d47
6
+ metadata.gz: 6cd6639f82511f747baebc0aeb4117f42561bd9987a248bfc23bdf4d9cea7f2cf04c60a00de6aefbc7e40cf3cf7861515f17b7e970ef1c7c88d793b6f52b19dd
7
+ data.tar.gz: 5479a3b76164c023acbe2415805809be3a33850f6fa71930882c507dce92d06ba289d41a2f5d94fca464a084dd7f440717c6fd902666415f2bb57a5c8235f7e1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History for gapic-generator
2
2
 
3
+ ### 0.45.4 / 2025-06-26
4
+
5
+ * Fix: docs for oneof parameters
6
+ * Fix: remove require when rest operations are not generated
7
+
3
8
  ### 0.45.3 / 2025-06-21
4
9
 
5
10
  * Fix: correct pagination heuristic for Compute
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Gapic
18
18
  module Generator
19
- VERSION = "0.45.3"
19
+ VERSION = "0.45.4"
20
20
  end
21
21
  end
@@ -72,8 +72,8 @@ module Gapic
72
72
  # gRPC client classes. Uses the default transport if not provided.
73
73
  # @return [String]
74
74
  #
75
- def doc_description transport: nil
76
- @field.docs_leading_comments transport: transport
75
+ def doc_description transport: nil, is_rpc_param: false
76
+ @field.docs_leading_comments transport: transport, is_rpc_param: is_rpc_param
77
77
  end
78
78
 
79
79
  def default_value
@@ -983,16 +983,22 @@ module Gapic
983
983
 
984
984
  # @private
985
985
  # Override this to add a note related to oneofs being mutually exclusive.
986
- def docs_leading_comments disable_xrefs: false, transport: nil
987
- str = super
986
+ def docs_leading_comments disable_xrefs: false, transport: nil, is_rpc_param: false
987
+ str = super(disable_xrefs: disable_xrefs, transport: transport)
988
988
  return str unless @oneof_siblings && @oneof_siblings.size > 1
989
989
  siblings = @oneof_siblings.map { |field| "`#{field.name}`" }.join ", "
990
- note = "Note: The following fields are mutually exclusive: " \
991
- "#{siblings}. If a field in that set is populated, all other " \
992
- "fields in the set will automatically be cleared."
990
+ note =
991
+ if is_rpc_param
992
+ "Note: The following parameters are mutually exclusive: #{siblings}. " \
993
+ "At most one of these parameters can be set. If more than one is set, " \
994
+ "only one will be used, and it is not defined which one."
995
+ else
996
+ "Note: The following fields are mutually exclusive: #{siblings}. " \
997
+ "If a field in that set is populated, all other fields in the set " \
998
+ "will automatically be cleared."
999
+ end
993
1000
  str ? "#{str.strip}\n\n#{note}" : note
994
1001
  end
995
-
996
1002
  # @!method name
997
1003
  # @return [String] the unqualified name of the field.
998
1004
  # @!method number
@@ -15,7 +15,7 @@ require "<%= service.credentials_require %>"
15
15
  <%- if service.paths? -%>
16
16
  require "<%= service.paths_require %>"
17
17
  <%- end -%>
18
- <%- if service.lro? -%>
18
+ <%- if service.rest.lro? -%>
19
19
  require "<%= service.rest.operations_require %>"
20
20
  <%- end -%>
21
21
  <%- if service.nonstandard_lro_provider? -%>
@@ -19,7 +19,7 @@
19
19
  <%- method.arguments.each do |arg| -%>
20
20
  # @param <%= arg.name %> [<%= arg.doc_types %>]
21
21
  <%- if arg.doc_description -%>
22
- <%= indent arg.doc_description(transport: :grpc), "# " %>
22
+ <%= indent arg.doc_description(transport: :grpc, is_rpc_param: true), "# " %>
23
23
  <%- end -%>
24
24
  <%- end -%>
25
25
  <%- end -%>
@@ -19,7 +19,7 @@
19
19
  <%- method.arguments.each do |arg| -%>
20
20
  # @param <%= arg.name %> [<%= arg.doc_types %>]
21
21
  <%- if arg.doc_description -%>
22
- <%= indent arg.doc_description(transport: :rest), "# " %>
22
+ <%= indent arg.doc_description(transport: :rest, is_rpc_param: true), "# " %>
23
23
  <%- end -%>
24
24
  <%- end -%>
25
25
  <%- end -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gapic-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.45.3
4
+ version: 0.45.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernest Landrito