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

feat: add initial messages support #586

Closed
wants to merge 13 commits into from
Closed

Conversation

dayaffe
Copy link
Contributor

@dayaffe dayaffe commented Sep 13, 2023

Add support for initial-messages (initial-request & initial-response)
See https://smithy.io/2.0/spec/streaming.html#initial-messages

Issue #

#976

Description of changes

  • Update HttpResponseTraitWithHttpPayload to take in responseBindings to be used to determine related initial-message members
  • Update HttpResponseTraightWithHttpPayload and HttpResponseTraightWithoutHttpPayload to handle parsing initialResponse members
  • Create ResponseHelpers.kt with reusable helper method for handling initialResponse members
  • Modify HttpBodyMiddleware.kt to support parsing initialRequest members. If any are present the first message in the stream will be an initial-request message constructed with a JSON payload that includes these members and their values.
  • Update codegen tests to include Event Stream with and without initial-request members. Event streams have Structure or Union shape types (see https://smithy.io/2.0/spec/streaming.html#event-streams)

Scope

  • 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.

@dayaffe
Copy link
Contributor Author

dayaffe commented Oct 11, 2023

Closing this PR. Initial-response will be handled in #597 and with awslabs/aws-sdk-swift#976

@dayaffe dayaffe closed this Oct 11, 2023
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.

1 participant