Adding basic support (untested) for client streaming
This commit is contained in:
committed by
Nat Noordanus
parent
a46979c8a6
commit
a757da1b29
@@ -311,8 +311,6 @@ def generate_code(request, response):
|
||||
}
|
||||
|
||||
for j, method in enumerate(service.method):
|
||||
if method.client_streaming:
|
||||
raise NotImplementedError("Client streaming not yet supported")
|
||||
|
||||
input_message = None
|
||||
input_type = get_ref_type(
|
||||
@@ -350,6 +348,9 @@ def generate_code(request, response):
|
||||
if method.server_streaming:
|
||||
output["typing_imports"].add("AsyncGenerator")
|
||||
|
||||
if method.client_streaming:
|
||||
output["typing_imports"].add("Iterator")
|
||||
|
||||
output["services"].append(data)
|
||||
|
||||
output["imports"] = sorted(output["imports"])
|
||||
|
||||
Reference in New Issue
Block a user