-
Notifications
You must be signed in to change notification settings - Fork 55
remove middleware Feature concept #425
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
|
A new generated diff is ready to view: __generated-main...__generated-refactor-middleware |
|
A new generated diff is ready to view: __generated-main...__generated-refactor-middleware |
|
A new generated diff is ready to view: __generated-main...__generated-refactor-middleware |
|
A new generated diff is ready to view: __generated-main...__generated-refactor-middleware |
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.
Fantastic!
| override fun install(op: SdkHttpOperation<*, *>) { | ||
| op.execution.mutate.register(this, Phase.Order.After) | ||
| } |
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.
Question: Isn't Order.After the default? How is this different from the default implementation of install?
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.
I believe it is yes. Probably just a miss, will double check. Good catch
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.
again, love the reduction here.
| writer.write("setIfMissing(#S, #S)", it.key, it.value) | ||
| writer.withBlock("op.install(", ")") { | ||
| withBlock("#T().apply {", "}", RuntimeTypes.Http.Middlware.MutateHeadersMiddleware) { | ||
| overrideHeaders.forEach { |
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.
nit:
I believe you can omit the writer. as your this is the writer via withBlock()
|
Kudos, SonarCloud Quality Gate passed!
|
|
A new generated diff is ready to view: __generated-main...__generated-refactor-middleware |








Issue #
sibling: smithy-lang/smithy-kotlin#536
Description of changes
Updates middleware and codegen to implement upstream interface changes
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.