Skip to content

Commit

Permalink
Minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
software-dov committed Mar 2, 2021
1 parent 81ff0fc commit 70b79cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gapic/schema/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,11 @@ def gapic_metadata(self, options: Options) -> gapic_metadata_pb2.GapicMetadata:
if "rest" in options.transport:
transports.append(("rest", service.client_name))

methods = sorted(service.methods.values(), key=lambda m: m.name)
for tprt, client_name in transports:
transport = service_desc.clients.get_or_create(tprt)
transport.library_client = client_name
for method in sorted(service.methods.values(), key=lambda m: m.name):
for method in methods:
method_desc = transport.rpcs.get_or_create(method.name)
method_desc.methods.append(to_snake_case(method.name))

Expand Down

0 comments on commit 70b79cf

Please sign in to comment.