Skip to content

Conversation

@kneekey23
Copy link
Contributor

@kneekey23 kneekey23 commented Jan 26, 2022

Description of changes

This PR removes generated middlewares that are duplicated and not needed in an effort to decrease binary size of generated sdks.
Corresponding PR: awslabs/aws-sdk-swift#532

Scope

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kneekey23 kneekey23 requested a review from a team as a code owner January 26, 2022 21:54
@kneekey23 kneekey23 requested a review from wooj2 January 27, 2022 02:25
Copy link
Contributor

@wooj2 wooj2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, this could have been split up in to 3 different prs -- one for body, one for headers, and one for query -- if we had done that, we could have incrementally tracked progress and/or have the ability to back things out. you can decide if you wanna keep it as-is or separated.

Copy link
Contributor

@wooj2 wooj2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

val inputShape = opIndex.getInput(op).get()

if (httpProtocolBodyMiddleware.shouldRenderHttpBodyMiddleware(inputShape)) {
if (MiddlewareShapeUtils.hasHttpBody(ctx.model, op) && MiddlewareShapeUtils.bodyIsHttpPayload(ctx.model, op)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it!

@kneekey23 kneekey23 merged commit 226c54c into main Jan 29, 2022
@kneekey23 kneekey23 deleted the fix/middlewaredup branch January 29, 2022 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants