Skip to content

Commit e299e90

Browse files
committed
fix: add per-service apiVersion to gapic_metadata
1 parent 0cf55c4 commit e299e90

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

Lines changed: 6 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,11 @@ def drift_manifest
538538
}
539539
}
540540
}
541+
if !@service.api_version.empty?
542+
h[:apiVersion] = @service.api_version
543+
end
544+
545+
return h
541546
end
542547

543548
##

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)