Skip to content

Commit 36920cf

Browse files
authored
fix: s/grpcAsync/grpc-async for gapic metadata (#803)
As discussed in the design doc, the agreed upon naming convention for the the asynchronous variants in gapic metadata use kebab-case instead of Pascal case.
1 parent ade7f8e commit 36920cf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/gapic-generator/gapic/schema/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def gapic_metadata(self, options: Options) -> gapic_metadata_pb2.GapicMetadata:
415415
transports = []
416416
if "grpc" in options.transport:
417417
transports.append(("grpc", service.client_name))
418-
transports.append(("grpcAsync", service.async_client_name))
418+
transports.append(("grpc-async", service.async_client_name))
419419

420420
if "rest" in options.transport:
421421
transports.append(("rest", service.client_name))

packages/gapic-generator/tests/unit/schema/test_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ def test_gapic_metadata():
13631363
"GiantPacific": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["giant_pacific"]),
13641364
},
13651365
),
1366-
"grpcAsync": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
1366+
"grpc-async": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
13671367
library_client="OctopusAsyncClient",
13681368
rpcs={
13691369
"BlueSpot": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["blue_spot"]),
@@ -1382,7 +1382,7 @@ def test_gapic_metadata():
13821382
"Ramshorn": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["ramshorn"]),
13831383
},
13841384
),
1385-
"grpcAsync": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
1385+
"grpc-async": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
13861386
library_client="SquidAsyncClient",
13871387
rpcs={
13881388
"Giant": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["giant"]),
@@ -1457,7 +1457,7 @@ def test_gapic_metadata():
14571457
"GiantPacific": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["giant_pacific"]),
14581458
},
14591459
),
1460-
"grpcAsync": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
1460+
"grpc-async": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
14611461
library_client="OctopusAsyncClient",
14621462
rpcs={
14631463
"BlueSpot": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["blue_spot"]),
@@ -1483,7 +1483,7 @@ def test_gapic_metadata():
14831483
"Ramshorn": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["ramshorn"]),
14841484
},
14851485
),
1486-
"grpcAsync": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
1486+
"grpc-async": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
14871487
library_client="SquidAsyncClient",
14881488
rpcs={
14891489
"Giant": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["giant"]),

0 commit comments

Comments
 (0)