Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit e3aa7a0

Browse files
authored
fix: fix missing http schema (http/https) for REST clients (#1063)
* fix: fix missing http schema (http/https) for REST clients * update integration tests to match templates changes
1 parent e47faa6 commit e3aa7a0

6 files changed

Lines changed: 7 additions & 6 deletions

File tree

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ class {{service.name}}RestTransport({{service.name}}Transport):
233233
headers = dict(metadata)
234234
headers['Content-Type'] = 'application/json'
235235
response=getattr(self._session, method)(
236-
uri,
236+
# Replace with proper schema configuration (http/https) logic
237+
"https://{host}{uri}".format(host=self._host, uri=uri),
237238
timeout=timeout,
238239
headers=headers,
239240
params=rest_helpers.flatten_query_params(query_params),

gapic/templates/setup.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ setuptools.setup(
3434
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
3535
{% endif %}
3636
'libcst >= 0.2.5',
37-
'proto-plus >= 1.19.4',
37+
'proto-plus >= 1.19.7',
3838
{% if api.requires_package(('google', 'iam', 'v1')) or opts.add_iam_methods %}
3939
'grpc-google-iam-v1 >= 0.12.3, < 0.13dev',
4040
{% endif %}

tests/integration/goldens/asset/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
install_requires=(
3737
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
3838
'libcst >= 0.2.5',
39-
'proto-plus >= 1.19.4',
39+
'proto-plus >= 1.19.7',
4040
'grpc-google-iam-v1 >= 0.12.3, < 0.13dev',
4141
),
4242
python_requires='>=3.6',

tests/integration/goldens/credentials/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
install_requires=(
3737
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
3838
'libcst >= 0.2.5',
39-
'proto-plus >= 1.19.4',
39+
'proto-plus >= 1.19.7',
4040
),
4141
python_requires='>=3.6',
4242
classifiers=[

tests/integration/goldens/logging/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
install_requires=(
3737
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
3838
'libcst >= 0.2.5',
39-
'proto-plus >= 1.19.4',
39+
'proto-plus >= 1.19.7',
4040
),
4141
python_requires='>=3.6',
4242
classifiers=[

tests/integration/goldens/redis/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
install_requires=(
3737
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
3838
'libcst >= 0.2.5',
39-
'proto-plus >= 1.19.4',
39+
'proto-plus >= 1.19.7',
4040
),
4141
python_requires='>=3.6',
4242
classifiers=[

0 commit comments

Comments
 (0)