Fix a bug where fields that were initially annotated with the `required` trait and later updated to use the `addedDefault` trait were not serialized when their values matched the default, even when the values were explicitly set. With this fix, fields with `addedDefault` are now always serialized.
<!-- Do not manually edit this file. Use the `changelogger` tool. -->
May 9th, 2025
=============
**Breaking Changes:**
- :warning: (all, [smithy-rs#4120](https://github.com/smithy-lang/smithy-rs/issues/4120)) Update MSRV to 1.82.0
**New this release:**
- :bug::tada: (client, [smithy-rs#4074](https://github.com/smithy-lang/smithy-rs/issues/4074), [smithy-rs#3926](https://github.com/smithy-lang/smithy-rs/issues/3926)) Promote `aws-smithy-mocks-experimental` to `aws-smithy-mocks`. This crate is now a recommended tool for testing
generated SDK clients. This release includes several fixes as well as a new sequence builder API that can be
used to test more complex scenarios such as retries.
```rust
use aws_sdk_s3::operation::get_object::GetObjectOutput;
use aws_sdk_s3::config::retry::RetryConfig;
use aws_smithy_types::byte_stream::ByteStream;
use aws_smithy_mocks::{mock, mock_client, RuleMode};
#[tokio::test]
async fn test_retry_behavior() {
// Create a rule that returns 503 twice, then succeeds
let retry_rule = mock!(aws_sdk_s3::Client::get_object)
.sequence()
.http_status(503, None)
.times(2) // Return 503 HTTP status twice
.output(|| GetObjectOutput::builder() // Finally return a successful output
let data = result.body.collect().await.expect("successful read").to_vec();
assert_eq!(data, b"success");
// Verify all responses were used
assert_eq!(retry_rule.num_calls(), 3);
}
```
- :bug: (all, [smithy-rs#4117](https://github.com/smithy-lang/smithy-rs/issues/4117)) Fix a bug where fields that were initially annotated with the `required` trait and later updated to use the `addedDefault` trait were not serialized when their values matched the default, even when the values were explicitly set. With this fix, fields with `addedDefault` are now always serialized.
"message":"Updates the default HTTP client to be based on the 1.x version of hyper and updates the default TLS provider to [rustls](https://github.com/rustls/rustls) with [aws-lc](https://github.com/aws/aws-lc-rs). For more information see the GitHub [discussion](https://github.com/awslabs/aws-sdk-rust/discussions/1257).\n",
"message":"Add support for the account-based endpoints in AWS SDKs. For more details, please refer to the [AWS SDKs and Tools Reference Guide on Account-Based Endpoints](https://docs.aws.amazon.com/sdkref/latest/guide/feature-account-endpoints.html).\n",
"message":"Fix a bug where fields that were initially annotated with the `required` trait and later updated to use the `addedDefault` trait were not serialized when their values matched the default, even when the values were explicitly set. With this fix, fields with `addedDefault` are now always serialized.\n",
"message":"Promote `aws-smithy-mocks-experimental` to `aws-smithy-mocks`. This crate is now a recommended tool for testing\ngenerated SDK clients. This release includes several fixes as well as a new sequence builder API that can be\nused to test more complex scenarios such as retries.\n\n```rust\nuse aws_sdk_s3::operation::get_object::GetObjectOutput;\nuse aws_sdk_s3::config::retry::RetryConfig;\nuse aws_smithy_types::byte_stream::ByteStream;\nuse aws_smithy_mocks::{mock, mock_client, RuleMode};\n\n#[tokio::test]\nasync fn test_retry_behavior() {\n // Create a rule that returns 503 twice, then succeeds\n let retry_rule = mock!(aws_sdk_s3::Client::get_object)\n .sequence()\n .http_status(503, None)\n .times(2) // Return 503 HTTP status twice\n .output(|| GetObjectOutput::builder() // Finally return a successful output\n .body(ByteStream::from_static(b\"success\"))\n .build())\n .build();\n\n // Create a mocked client with the rule\n let s3 = mock_client!(\n aws_sdk_s3,\n RuleMode::Sequential,\n [&retry_rule],\n |client_builder| {\n client_builder.retry_config(RetryConfig::standard().with_max_attempts(3))\n }\n );\n\n // This should succeed after two retries\n let result = s3\n .get_object()\n .bucket(\"test-bucket\")\n .key(\"test-key\")\n .send()\n .await\n .expect(\"success after retries\");\n\n // Verify the response\n let data = result.body.collect().await.expect(\"successful read\").to_vec();\n assert_eq!(data, b\"success\");\n\n // Verify all responses were used\n assert_eq!(retry_rule.num_calls(), 3);\n}\n```\n",