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

Smithy 1.26.2 upgrade / ensure that even empty lists are serialized #1972

Merged
merged 4 commits into from
Nov 10, 2022

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Nov 9, 2022

Motivation and Context

Description

@jdisanti, let me know your thoughts on this approach. The spec was altered to state that empty lists should be serialized—I decided to handle this at the runtime-level, but I'm open to other suggestions.

Testing

  • codegen integration tests

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rcoh rcoh requested review from a team as code owners November 9, 2022 18:24
// Calling this drops self
// https://github.com/awslabs/smithy/commit/715b1d94ab14764ad43496b016b0c2e85bcf1d1f
// If the list was empty, just serialize the parameter name
if self.next_index == 1 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not required since this is covered by protocol test, but it would be nice to have a Rust unit test for this.

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

@jdisanti jdisanti mentioned this pull request Nov 9, 2022
2 tasks
@rcoh rcoh changed the title Ensure that even empty lists are serialized Smithy 1.26.2 upgrade Ensure that even empty lists are serialized Nov 10, 2022
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh rcoh changed the title Smithy 1.26.2 upgrade Ensure that even empty lists are serialized Smithy 1.26.2 upgrade / ensure that even empty lists are serialized Nov 10, 2022
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh rcoh enabled auto-merge (squash) November 10, 2022 17:04
@rcoh rcoh merged commit 16d212e into main Nov 10, 2022
@rcoh rcoh deleted the smithy-1.26.2 branch November 10, 2022 17:09
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.

4 participants