-
Notifications
You must be signed in to change notification settings - Fork 35
fix: remove duplicated middlewares #400
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
Conversation
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.
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.
...main/kotlin/software/amazon/smithy/swift/codegen/integration/HttpBindingProtocolGenerator.kt
Outdated
Show resolved
Hide resolved
...ftware/amazon/smithy/swift/codegen/integration/HttpProtocolBodyMiddlewareGeneratorFactory.kt
Show resolved
Hide resolved
...software/amazon/smithy/swift/codegen/integration/middlewares/OperationInputBodyMiddleware.kt
Outdated
Show resolved
Hide resolved
...software/amazon/smithy/swift/codegen/integration/middlewares/OperationInputBodyMiddleware.kt
Outdated
Show resolved
Hide resolved
...oftware/amazon/smithy/swift/codegen/integration/middlewares/handlers/HttpHeaderMiddleware.kt
Outdated
Show resolved
Hide resolved
...oftware/amazon/smithy/swift/codegen/integration/middlewares/handlers/HttpHeaderMiddleware.kt
Outdated
Show resolved
Hide resolved
...ware/amazon/smithy/swift/codegen/integration/middlewares/handlers/HttpQueryItemMiddleware.kt
Outdated
Show resolved
Hide resolved
Packages/ClientRuntime/Sources/Networking/Http/Middlewares/SerializableBodyMiddleware.swift
Outdated
Show resolved
Hide resolved
...software/amazon/smithy/swift/codegen/integration/middlewares/OperationInputBodyMiddleware.kt
Outdated
Show resolved
Hide resolved
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.
lgtm!
| val inputShape = opIndex.getInput(op).get() | ||
|
|
||
| if (httpProtocolBodyMiddleware.shouldRenderHttpBodyMiddleware(inputShape)) { | ||
| if (MiddlewareShapeUtils.hasHttpBody(ctx.model, op) && MiddlewareShapeUtils.bodyIsHttpPayload(ctx.model, op)) { |
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.
love it!
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
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.