google-apis-generator 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/google/apis/generator/annotator.rb +1 -1
- data/lib/google/apis/generator/templates/_method.tmpl +1 -1
- data/lib/google/apis/generator/version.rb +1 -1
- data/lib/google/apis/generator.rb +0 -1
- metadata +6 -11
- data/lib/google/apis/generator/patch.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d5cacbe3759485e6ce62d3ee51807cbe764aae9b536f6f2ec635dbcffe506d5
|
4
|
+
data.tar.gz: 6b9cc7f244fca394d0bd785aea5e4b8d3f5856cafb4d660c76b61d85d9d53423
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 280fc7f56428bc07211c94574b70ca7a5397176f4e923993f0bc717a9dc16553fc559e070179e4db1e1732f54b902ebfdba18e46402e04a4f5e330a9489d8499
|
7
|
+
data.tar.gz: 4e1a1be0972dec747923c9c5075446b15a7a5d500647cf360c64d98ea9d9d15e32f13894fc857c257790c4121ac834dccb97b0304a164f09ed6ab3cc57ae4706
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 0.16.0 (2025-01-10)
|
4
|
+
|
5
|
+
#### Bug Fixes
|
6
|
+
|
7
|
+
* fix a corner case with a missing ref ([#21133](https://github.com/googleapis/google-api-ruby-client/issues/21133))
|
8
|
+
|
9
|
+
### 0.15.1 (2024-07-29)
|
10
|
+
|
11
|
+
#### Bug Fixes
|
12
|
+
|
13
|
+
* remove rexml from dependencies ([#19971](https://github.com/googleapis/google-api-ruby-client/issues/19971))
|
14
|
+
* Remove temporary discovery patch ([#19972](https://github.com/googleapis/google-api-ruby-client/issues/19972))
|
15
|
+
|
3
16
|
### 0.15.0 (2024-05-13)
|
4
17
|
|
5
18
|
#### Features
|
@@ -112,7 +112,7 @@ module Google
|
|
112
112
|
parts = method.id.split('.')
|
113
113
|
parts.shift
|
114
114
|
verb = ActiveSupport::Inflector.underscore(parts.pop)
|
115
|
-
match = method.request._ref
|
115
|
+
match = method.request._ref&.match(/(.*)(?i:request)/)
|
116
116
|
return nil if match.nil?
|
117
117
|
name = ActiveSupport::Inflector.underscore(match[1])
|
118
118
|
return nil unless name == verb || name.start_with?(verb + '_')
|
@@ -103,7 +103,7 @@ def <%= api_method.generated_name %>(<% for param in api_method.required_paramet
|
|
103
103
|
<% for param in api.parameters.values.reject {|p| p.name == 'key'} -%>
|
104
104
|
command.query['<%= param.name %>'] = <%= param.generated_name %> unless <%= param.generated_name %>.nil?
|
105
105
|
<% end -%>
|
106
|
-
<% unless api_method.api_version.empty? -%>
|
106
|
+
<% unless api_method.api_version.to_s.empty? -%>
|
107
107
|
command.set_api_version_header "<%= api_method.api_version %>"
|
108
108
|
<% end -%>
|
109
109
|
execute_or_queue_command(command, &block)
|
@@ -18,7 +18,6 @@ require 'google/apis/generator/model'
|
|
18
18
|
require 'google/apis/generator/template'
|
19
19
|
require 'google/apis/generator/updater'
|
20
20
|
require 'google/apis/generator/version'
|
21
|
-
require 'google/apis/generator/patch'
|
22
21
|
require 'active_support'
|
23
22
|
require 'active_support/core_ext'
|
24
23
|
require 'active_support/inflector'
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-10 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activesupport
|
@@ -64,14 +63,14 @@ dependencies:
|
|
64
63
|
requirements:
|
65
64
|
- - "~>"
|
66
65
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0.
|
66
|
+
version: '0.18'
|
68
67
|
type: :runtime
|
69
68
|
prerelease: false
|
70
69
|
version_requirements: !ruby/object:Gem::Requirement
|
71
70
|
requirements:
|
72
71
|
- - "~>"
|
73
72
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0.
|
73
|
+
version: '0.18'
|
75
74
|
- !ruby/object:Gem::Dependency
|
76
75
|
name: thor
|
77
76
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,7 +91,6 @@ dependencies:
|
|
92
91
|
- - "<"
|
93
92
|
- !ruby/object:Gem::Version
|
94
93
|
version: 2.a
|
95
|
-
description:
|
96
94
|
email: googleapis-packages@google.com
|
97
95
|
executables:
|
98
96
|
- generate-api
|
@@ -108,7 +106,6 @@ files:
|
|
108
106
|
- lib/google/apis/generator/annotator.rb
|
109
107
|
- lib/google/apis/generator/helpers.rb
|
110
108
|
- lib/google/apis/generator/model.rb
|
111
|
-
- lib/google/apis/generator/patch.rb
|
112
109
|
- lib/google/apis/generator/template.rb
|
113
110
|
- lib/google/apis/generator/templates/_class.tmpl
|
114
111
|
- lib/google/apis/generator/templates/_method.tmpl
|
@@ -139,9 +136,8 @@ licenses:
|
|
139
136
|
metadata:
|
140
137
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
141
138
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-generator/CHANGELOG.md
|
142
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-generator/v0.
|
139
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-generator/v0.16.0
|
143
140
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-generator
|
144
|
-
post_install_message:
|
145
141
|
rdoc_options: []
|
146
142
|
require_paths:
|
147
143
|
- lib
|
@@ -156,8 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
152
|
- !ruby/object:Gem::Version
|
157
153
|
version: '0'
|
158
154
|
requirements: []
|
159
|
-
rubygems_version: 3.
|
160
|
-
signing_key:
|
155
|
+
rubygems_version: 3.6.2
|
161
156
|
specification_version: 4
|
162
157
|
summary: Code generator for legacy Google REST clients
|
163
158
|
test_files: []
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'google/apis/discovery_v1'
|
2
|
-
|
3
|
-
# Extend the DiscoveryV1 API classes with additional fields for code generation,
|
4
|
-
# supporting features which are not present in the schema itself.
|
5
|
-
unless Google::Apis::DiscoveryV1::RestMethod.method_defined? :api_version
|
6
|
-
module Google
|
7
|
-
module Apis
|
8
|
-
module DiscoveryV1
|
9
|
-
class RestMethod
|
10
|
-
# The `apiVersion` for this method, or empty if not present.
|
11
|
-
# @return [String]
|
12
|
-
attr_accessor :api_version
|
13
|
-
|
14
|
-
# @private
|
15
|
-
# The original DiscoveryV1::RestMethod `update!` method to be called
|
16
|
-
# after applying patches to this schema.
|
17
|
-
alias_method :update_discovery!, :update!
|
18
|
-
|
19
|
-
# Update properties of this object.
|
20
|
-
def update!(**args)
|
21
|
-
@api_version = args.key?(:api_version) ? args[:api_version] : ""
|
22
|
-
update_discovery!(**args)
|
23
|
-
end
|
24
|
-
|
25
|
-
# @private
|
26
|
-
class Representation
|
27
|
-
# @private
|
28
|
-
# The api_version based on the JSON key value.
|
29
|
-
property :api_version, as: 'apiVersion'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|