-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle multiple paged responses #664
Handle multiple paged responses #664
Conversation
@@ -107,7 +107,7 @@ public ClientBuilder(BuildContext context) | |||
nextPageMethods.Add(nextPageMethod); | |||
} | |||
|
|||
if (!(method.Responses.Single().ResponseBody is ObjectResponseBody objectResponseBody)) | |||
if (!(method.Responses.Single(r => r.ResponseBody != null).ResponseBody is ObjectResponseBody objectResponseBody)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this is Single instead of First? Is there not a situation in which 2 different responses return different response bodies?
Also, line 118 has and
in the message instead of an
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there not a situation in which 2 different responses return different response bodies?
Never see it.
Just pick the one with body.
Fixes #625
Filed: Azure/autorest.testserver#169