-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
area-grpcIncludes: GRPC wire-up, templatesIncludes: GRPC wire-up, templates
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Json Transcoding correctly supports the streaming of objects when calling a gRPC server streaming method. When testing an URL directly, multiple json objects are returned.
The generated swagger document however, describes the operation as only returning a single object instead of an array of objects. When generating client code from the swagger.json file, the code also will only return a single object.
Below snippet is from the swagger.json generated by the gRPC Transcoder sample application
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HelloReply"
}
}
}
}
Expected Behavior
Below response would generate correct client code:
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HelloReply"
}
}
}
}
}
Steps To Reproduce
Can be reproduced using the Transcoder sample: https://github.com/grpc/grpc-dotnet/tree/master/examples/Transcoder
Exceptions (if any)
No response
.NET Version
7.0
Anything else?
No response
Metadata
Metadata
Assignees
Labels
area-grpcIncludes: GRPC wire-up, templatesIncludes: GRPC wire-up, templates