Skip to content

Commit

Permalink
fix: s/grpcAsync/grpc-async for gapic metadata (#803)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
software-dov authored Mar 4, 2021
1 parent cde50f8 commit 96f7864
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gapic/schema/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def gapic_metadata(self, options: Options) -> gapic_metadata_pb2.GapicMetadata:
transports = []
if "grpc" in options.transport:
transports.append(("grpc", service.client_name))
transports.append(("grpcAsync", service.async_client_name))
transports.append(("grpc-async", service.async_client_name))

if "rest" in options.transport:
transports.append(("rest", service.client_name))
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/schema/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ def test_gapic_metadata():
"GiantPacific": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["giant_pacific"]),
},
),
"grpcAsync": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
"grpc-async": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
library_client="OctopusAsyncClient",
rpcs={
"BlueSpot": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["blue_spot"]),
Expand All @@ -1382,7 +1382,7 @@ def test_gapic_metadata():
"Ramshorn": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["ramshorn"]),
},
),
"grpcAsync": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
"grpc-async": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
library_client="SquidAsyncClient",
rpcs={
"Giant": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["giant"]),
Expand Down Expand Up @@ -1457,7 +1457,7 @@ def test_gapic_metadata():
"GiantPacific": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["giant_pacific"]),
},
),
"grpcAsync": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
"grpc-async": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
library_client="OctopusAsyncClient",
rpcs={
"BlueSpot": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["blue_spot"]),
Expand All @@ -1483,7 +1483,7 @@ def test_gapic_metadata():
"Ramshorn": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["ramshorn"]),
},
),
"grpcAsync": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
"grpc-async": gapic_metadata_pb2.GapicMetadata.ServiceAsClient(
library_client="SquidAsyncClient",
rpcs={
"Giant": gapic_metadata_pb2.GapicMetadata.MethodList(methods=["giant"]),
Expand Down

0 comments on commit 96f7864

Please sign in to comment.