Skip to content

Commit c06ea88

Browse files
authored
fix: add per-service apiVersion to gapic_metadata (#1239)
* fix: add per-service apiVersion to gapic_metadata * use unless instead of if * use unless instead of if for real this time * go back to variable and conditional add
1 parent dda8dbb commit c06ea88

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

gapic-generator/lib/gapic/presenters/service_presenter.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ def grpc_full_name
526526
#
527527
# @return [Hash]
528528
def drift_manifest
529-
{
529+
h = {
530530
clients: {
531531
grpc: {
532532
libraryClient: client_name_full,
@@ -538,6 +538,8 @@ def drift_manifest
538538
}
539539
}
540540
}
541+
h[:apiVersion] = @service.api_version unless @service.api_version.empty?
542+
h
541543
end
542544

543545
##

shared/output/gapic/templates/showcase/gapic_metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@
126126
}
127127
}
128128
}
129-
}
129+
},
130+
"apiVersion": "v1_20240408"
130131
},
131132
"Identity": {
132133
"clients": {

0 commit comments

Comments
 (0)