google-apis-generator 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3347af37b44c45d39172b77ec247482186bcbc3c5e94df0f6d07af98e15c2abb
4
- data.tar.gz: 2e19616d3cd91d5cb16104a38348a7eb91e0b92dbe78a02b7fc71b970a2d91be
3
+ metadata.gz: d112bf5ef17c677ba3dc00e10370cc4084a97d9434b97793128826603cf0915e
4
+ data.tar.gz: db12d66289c70e8bca72bd1531b58dedd3e380cab00b3123ccb18431a71c5d4a
5
5
  SHA512:
6
- metadata.gz: 5eec7be14709c197bccc4ac55a1984e77519627877faaa70b159fedd3ca3a9ef822039fa425f931f4b94af5a53b62ddb8716b1cfa2084a529527bfe344e8a453
7
- data.tar.gz: e616bc6a937bfa06ffa2a617b41e053d9c3c3f4c1bca14f9dbbeb4b9f2b61c5044ea52f3729b940f89853654e96854bccde734e08eda28b254dee7272f302a10
6
+ metadata.gz: 9f5890f933866be0152ef0d999301195f2162bffa4c36e0ca25e675620eb316ef23c3bdf3805907e479cb8360d05e2445cabc55c421e11c0c2dbc548e7d524eb
7
+ data.tar.gz: 0355ebd7b8c181e7a3b50186811c3153bb5caf1eef5e7257442d60edc865704f38c9495d24bc693510ddb7f5bf7fe80b9bce965737975566d94daa74ec63b372
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 0.11.1 (2023-01-04)
4
+
5
+ #### Bug Fixes
6
+
7
+ * Fix crash when a response doesn't reference a type ([#13150](https://github.com/googleapis/google-api-ruby-client/issues/13150))
8
+
3
9
  ### 0.11.0 (2022-10-18)
4
10
 
5
11
  #### Features
@@ -6,7 +6,7 @@
6
6
  # <%= block_comment(param.description, 0, 3) %>
7
7
  <% end -%>
8
8
  <% end -%>
9
- <% if api_method.request -%>
9
+ <% if api.schemas[api_method.request&._ref] -%>
10
10
  # @param [<%= api.schemas[api_method.request._ref].generated_type %>] <%= api.schemas[api_method.request._ref].generated_name %>_object
11
11
  <% end -%>
12
12
  <% for param in api_method.optional_query_parameters -%>
@@ -34,7 +34,7 @@
34
34
  # Request-specific options
35
35
  #
36
36
  # @yield [result, err] Result & error if block supplied
37
- <% if api_method.response -%>
37
+ <% if api.schemas[api_method.response&._ref] -%>
38
38
  # @yieldparam result [<%= api.schemas[api_method.response._ref].generated_type %>] parsed result object
39
39
  # @yieldparam err [StandardError] error object if request failed
40
40
  #
@@ -49,7 +49,7 @@
49
49
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
50
50
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
51
51
  # @raise [Google::Apis::AuthorizationError] Authorization is required
52
- def <%= api_method.generated_name %>(<% for param in api_method.required_parameters %><%= param.generated_name %>, <% end %><% if api_method.request %><%= api.schemas[api_method.request._ref].generated_name %>_object = nil, <% end %><% for param in api_method.optional_query_parameters %><%= param.generated_name %>: nil, <% end %><% for param in api.parameters.values.reject {|p| p.name == 'key'} %><%= param.generated_name %>: nil, <% end %><% if api_method.supports_media_upload? %>upload_source: nil, content_type: nil, <% elsif api_method.supports_media_download? %>download_dest: nil, <% end %>options: nil, &block)
52
+ def <%= api_method.generated_name %>(<% for param in api_method.required_parameters %><%= param.generated_name %>, <% end %><% if api.schemas[api_method.request&._ref] %><%= api.schemas[api_method.request._ref].generated_name %>_object = nil, <% end %><% for param in api_method.optional_query_parameters %><%= param.generated_name %>: nil, <% end %><% for param in api.parameters.values.reject {|p| p.name == 'key'} %><%= param.generated_name %>: nil, <% end %><% if api_method.supports_media_upload? %>upload_source: nil, content_type: nil, <% elsif api_method.supports_media_download? %>download_dest: nil, <% end %>options: nil, &block)
53
53
  <% if api_method.supports_media_upload? && api.name == 'Storage' %>
54
54
  if upload_source.nil?
55
55
  command = make_simple_command(:<%= api_method.http_method.downcase %>, '<%= api_method.path %>', options)
@@ -83,11 +83,11 @@ def <%= api_method.generated_name %>(<% for param in api_method.required_paramet
83
83
  <% else -%>
84
84
  command = make_simple_command(:<%= api_method.http_method.downcase %>, '<%= api_method.path %>', options)
85
85
  <% end -%>
86
- <% if api_method.request -%>
86
+ <% if api.schemas[api_method.request&._ref] -%>
87
87
  command.request_representation = <%= api.schemas[api_method.request._ref].generated_type %>::Representation
88
88
  command.request_object = <%= api.schemas[api_method.request._ref].generated_name %>_object
89
89
  <% end -%>
90
- <% if api_method.response -%>
90
+ <% if api.schemas[api_method.response&._ref] -%>
91
91
  <% if api.force_alt_json? -%>
92
92
  command.query['alt'] = 'json'
93
93
  <% end -%>
@@ -15,7 +15,7 @@
15
15
  module Google
16
16
  module Apis
17
17
  class Generator
18
- VERSION = "0.11.0"
18
+ VERSION = "0.11.1"
19
19
  end
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-18 00:00:00.000000000 Z
11
+ date: 2023-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -138,7 +138,7 @@ licenses:
138
138
  metadata:
139
139
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
140
140
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-generator/CHANGELOG.md
141
- documentation_uri: https://googleapis.dev/ruby/google-apis-generator/v0.11.0
141
+ documentation_uri: https://googleapis.dev/ruby/google-apis-generator/v0.11.1
142
142
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-generator
143
143
  post_install_message:
144
144
  rdoc_options: []