Skip to content
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

codegen: Limit SDKs API payload ignoring trait to unmodeled request inputs #4139

Merged
merged 2 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
### SDK Enhancements

### SDK Bugs
* `codegen`: Fix SDK not draining HTTP response body for operations without modeled output parameters.
* Fixes a bug in the SDK that was causing HTTP response bodies to not be drained, preventing the connection being reused in the connection pool. For some operations this could contributed to an increase in `close_wait` connection states.
4 changes: 2 additions & 2 deletions private/model/api/codegentest/service/restjsonservice/api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion private/model/api/shape.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ func (ref *ShapeRef) GoTags(toplevel bool, isRequired bool) string {
if name := ref.Shape.PayloadRefName(); len(name) > 0 {
tags = append(tags, ShapeTag{"payload", name})
}
if !ref.Shape.HasPayloadMembers() && ref.API.Metadata.Protocol == "rest-json" {
if ref.Shape.UsedAsInput && !ref.Shape.HasPayloadMembers() && ref.API.Metadata.Protocol == "rest-json" {
tags = append(tags, ShapeTag{"nopayload", "true"})
}
}
Expand Down
Loading