google-apis-generator 0.14.0 → 0.15.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 +7 -0
- data/lib/google/apis/generator/patch.rb +35 -0
- data/lib/google/apis/generator/templates/_method.tmpl +3 -0
- data/lib/google/apis/generator/templates/gemspec.tmpl +1 -1
- data/lib/google/apis/generator/version.rb +1 -1
- data/lib/google/apis/generator.rb +1 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7ae10ea9397b32a9f875aab52e76afb290e77cc6bdcf725b55bbbd37bc44cec
|
4
|
+
data.tar.gz: 50c0575fb6de5e2ac17a511cc909e991fc9458c8e933db890de9bb962ddf6b49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ca6cb0de63dc094bbc0ef94ba83eec49d5626fa44bc8bc73276489ab244db6a9fdd283ed8e35e147f2a3c5c6bb800a2aec0d47398178246ffb632d3258534bc
|
7
|
+
data.tar.gz: 488fd5355004ca8efe3690c92fc05df94a774563ebb8982c6b6e369dd78c85b8e86a933bc2f0295b155d4e31bebdf5c71758931514d4050caaff57e3e2151a82
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 0.15.0 (2024-05-13)
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* Introduce api_version to discovery clients ([#18969](https://github.com/googleapis/google-api-ruby-client/issues/18969))
|
8
|
+
* Update generated clients to depend on google-apis-core 0.15.0 ([#18985](https://github.com/googleapis/google-api-ruby-client/issues/18985))
|
9
|
+
|
3
10
|
### 0.14.0 (2024-02-23)
|
4
11
|
|
5
12
|
#### Features
|
@@ -0,0 +1,35 @@
|
|
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
|
@@ -102,6 +102,9 @@ def <%= api_method.generated_name %>(<% for param in api_method.required_paramet
|
|
102
102
|
<% end -%>
|
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
|
+
<% end -%>
|
106
|
+
<% unless api_method.api_version.empty? -%>
|
107
|
+
command.set_api_version_header "<%= api_method.api_version %>"
|
105
108
|
<% end -%>
|
106
109
|
execute_or_queue_command(command, &block)
|
107
110
|
end
|
@@ -18,6 +18,7 @@ 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'
|
21
22
|
require 'active_support'
|
22
23
|
require 'active_support/core_ext'
|
23
24
|
require 'active_support/inflector'
|
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.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.15.0
|
48
48
|
- - "<"
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: 2.a
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
requirements:
|
55
55
|
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.
|
57
|
+
version: 0.15.0
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 2.a
|
@@ -108,6 +108,7 @@ files:
|
|
108
108
|
- lib/google/apis/generator/annotator.rb
|
109
109
|
- lib/google/apis/generator/helpers.rb
|
110
110
|
- lib/google/apis/generator/model.rb
|
111
|
+
- lib/google/apis/generator/patch.rb
|
111
112
|
- lib/google/apis/generator/template.rb
|
112
113
|
- lib/google/apis/generator/templates/_class.tmpl
|
113
114
|
- lib/google/apis/generator/templates/_method.tmpl
|
@@ -138,7 +139,7 @@ licenses:
|
|
138
139
|
metadata:
|
139
140
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
140
141
|
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.
|
142
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-generator/v0.15.0
|
142
143
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-generator
|
143
144
|
post_install_message:
|
144
145
|
rdoc_options: []
|