-
Notifications
You must be signed in to change notification settings - Fork 195
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
Add incomplete Event Stream support with working Amazon Transcribe example #653
Conversation
...en/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/BuilderGenerator.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.
overall this looks great. I didn't review with a find tooth comb looking for bugs yet, more as a general structure. My main comment is around the synthetic event stream shapes, but I think we're really close here overall.
aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SigV4SigningDecorator.kt
Show resolved
Hide resolved
val initial = super.toSymbol(shape) | ||
|
||
// We only want to wrap with Event Stream types when dealing with member shapes | ||
if (shape is MemberShape && shape.isEventStream(model)) { |
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.
generally I structure this as a series of rule outs to remove the nesting, YMMV
...en/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/BuilderGenerator.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/HttpProtocolGenerator.kt
Show resolved
Hide resolved
codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/UnionGenerator.kt
Outdated
Show resolved
Hide resolved
...otlin/software/amazon/smithy/rust/codegen/smithy/generators/http/ResponseBindingGenerator.kt
Outdated
Show resolved
Hide resolved
...ftware/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGenerator.kt
Show resolved
Hide resolved
...ftware/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGenerator.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! left some potential cleanup ideas inline
Motivation and Context
This is progress towards adding full Event Stream support to smithy-rs (#121). In particular, this PR:
SMITHYRS_EXPERIMENTAL_EVENTSTREAM
environment variable which, when set to1
, turns off the removal of Event Stream operationsTODO(EventStream)
tagsTesting
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.