Skip to content

Commit b1cc7fd

Browse files
committed
fix: pass service parameter to operations mixin macro to fix method generation
1 parent a11f0d7 commit b1cc7fd

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

core/generator/gapic-generator-typescript/templates/cjs/typescript_gapic/_operations.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{%- macro operationsServiceMethods() -%}
1+
{%- macro operationsServiceMethods(service) -%}
22
{#-
33
This part will be added into src/version/client.ts.
44
If the --service-yaml contains "google.longrunning.Operations", it means the client requires Operations methods [getOperation, listOperationsAsync, cancelOperation, deleteOperation].

core/generator/gapic-generator-typescript/templates/cjs/typescript_gapic/src/$version/$service_client.ts.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ export class {{ service.name }}Client {
11091109
{{ location.locationServiceMethods(service)}}
11101110
{% endif -%}
11111111
{%- if service.LongRunningOperationsMixin > 0 %}
1112-
{{ operations.operationsServiceMethods()}}
1112+
{{ operations.operationsServiceMethods(service)}}
11131113
{% endif -%}
11141114
{%- if service.pathTemplates.length > 0 %}
11151115
// --------------------

core/generator/gapic-generator-typescript/templates/esm/typescript_gapic/_operations.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{%- macro operationsServiceMethods() -%}
1+
{%- macro operationsServiceMethods(service) -%}
22
{#-
33
This part will be added into src/version/client.ts.
44
If the --service-yaml contains "google.longrunning.Operations", it means the client requires Operations methods [getOperation, listOperationsAsync, cancelOperation, deleteOperation].

core/generator/gapic-generator-typescript/templates/esm/typescript_gapic/esm/src/$version/$service_client.ts.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ export class {{ service.name }}Client {
11161116
{{ location.locationServiceMethods(service)}}
11171117
{% endif -%}
11181118
{%- if service.LongRunningOperationsMixin > 0 %}
1119-
{{ operations.operationsServiceMethods()}}
1119+
{{ operations.operationsServiceMethods(service)}}
11201120
{% endif -%}
11211121
{%- if service.pathTemplates.length > 0 %}
11221122
// --------------------

0 commit comments

Comments
 (0)