Skip to content

Commit

Permalink
fix: fix missing http schema (http/https) for REST clients (#1063)
Browse files Browse the repository at this point in the history
* fix: fix missing http schema (http/https) for REST clients

* update integration tests to match templates changes
  • Loading branch information
vam-google authored Nov 3, 2021
1 parent e47faa6 commit e3aa7a0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ class {{service.name}}RestTransport({{service.name}}Transport):
headers = dict(metadata)
headers['Content-Type'] = 'application/json'
response=getattr(self._session, method)(
uri,
# Replace with proper schema configuration (http/https) logic
"https://{host}{uri}".format(host=self._host, uri=uri),
timeout=timeout,
headers=headers,
params=rest_helpers.flatten_query_params(query_params),
Expand Down
2 changes: 1 addition & 1 deletion gapic/templates/setup.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ setuptools.setup(
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
{% endif %}
'libcst >= 0.2.5',
'proto-plus >= 1.19.4',
'proto-plus >= 1.19.7',
{% if api.requires_package(('google', 'iam', 'v1')) or opts.add_iam_methods %}
'grpc-google-iam-v1 >= 0.12.3, < 0.13dev',
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/asset/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
install_requires=(
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
'libcst >= 0.2.5',
'proto-plus >= 1.19.4',
'proto-plus >= 1.19.7',
'grpc-google-iam-v1 >= 0.12.3, < 0.13dev',
),
python_requires='>=3.6',
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/credentials/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
install_requires=(
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
'libcst >= 0.2.5',
'proto-plus >= 1.19.4',
'proto-plus >= 1.19.7',
),
python_requires='>=3.6',
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/logging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
install_requires=(
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
'libcst >= 0.2.5',
'proto-plus >= 1.19.4',
'proto-plus >= 1.19.7',
),
python_requires='>=3.6',
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/redis/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
install_requires=(
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
'libcst >= 0.2.5',
'proto-plus >= 1.19.4',
'proto-plus >= 1.19.7',
),
python_requires='>=3.6',
classifiers=[
Expand Down

0 comments on commit e3aa7a0

Please sign in to comment.