# Example changelog entries
# [[aws-sdk-rust]]
# message = "Fix typos in module documentation for generated crates"
# references = ["smithy-rs#920"]
# meta = { "breaking" = false, "tada" = false, "bug" = false }
# author = "rcoh"
#
# [[smithy-rs]]
# message = "Fix typos in module documentation for generated crates"
# references = ["smithy-rs#920"]
# meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"}
# author = "rcoh"

[[aws-sdk-rust]]
message = """
Service configs are now generated with new accessors for:
- `Config::retry_config()` - Returns a reference to the inner retry configuration.
- `Config::timeout_config()` - Returns a reference to the inner timeout configuration.
- `Config::sleep_impl()` - Returns a clone of the inner async sleep implementation.

Previously, these were only accessible through `SdkConfig`.
"""
references = ["smithy-rs#1598"]
meta = { "breaking" = false, "tada" = true, "bug" = false }
author = "Velfi"

[[smithy-rs]]
message = """
Previously, the config customizations that added functionality related to retry configs, timeout configs, and the
async sleep impl were defined in the smithy codegen module but were being loaded in the AWS codegen module. They
have now been updated to be loaded during smithy codegen. The affected classes are all defined in the
`software.amazon.smithy.rust.codegen.smithy.customizations` module of smithy codegen.` This change does not affect
the generated code.

These classes have been removed:
- `RetryConfigDecorator`
- `SleepImplDecorator`
- `TimeoutConfigDecorator`

These classes have been renamed:
- `RetryConfigProviderConfig` is now `RetryConfigProviderCustomization`
- `PubUseRetryConfig` is now `PubUseRetryConfigGenerator`
- `SleepImplProviderConfig` is now `SleepImplProviderCustomization`
- `TimeoutConfigProviderConfig` is now `TimeoutConfigProviderCustomization`
"""
references = ["smithy-rs#1598"]
meta = { "breaking" = true, "tada" = true, "bug" = false, "target" = "client" }
author = "Velfi"

[[smithy-rs]]
message = "Add codegen version to generated package metadata"
references = ["smithy-rs#1612"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "unexge"

[[smithy-rs]]
message = """
Support granular control of specifying runtime crate versions.

For code generation, the field `runtimeConfig.version` in smithy-build.json has been removed.
The new field `runtimeConfig.versions` is an object whose keys are runtime crate names (e.g. `aws-smithy-http`),
and values are user-specified versions.

If you previously set `version = "DEFAULT"`, the migration path is simple.
By setting `versions` with an empty object or just not setting it at all,
the version number of the code generator will be used as the version for all runtime crates.

If you specified a certain version such as `version = "0.47.0", you can migrate to a special reserved key `DEFAULT`.
The equivalent JSON config would look like:

```json
{
  "runtimeConfig": {
      "versions": {
          "DEFAULT": "0.47.0"
      }
  }
}
```

Then all runtime crates are set with version 0.47.0 by default unless overridden by specific crates. For example,

```json
{
  "runtimeConfig": {
      "versions": {
          "DEFAULT": "0.47.0",
          "aws-smithy-http": "0.47.1"
      }
  }
}
```

implies that we're using `aws-smithy-http` 0.47.1 specifically. For the rest of the crates, it will default to 0.47.0.
"""
references = ["smithy-rs#1635", "smithy-rs#1416"]
meta = { "breaking" = true, "tada" = true, "bug" = false }
author = "weihanglo"

[[smithy-rs]]
message = """
Servers now allow requests' ACCEPT header values to be:
- `*/*`
- `type/*`
- `type/subtype`
"""
references = ["smithy-rs#1544"]
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "server" }
author = "82marbag"

[[smithy-rs]]
message = """
There is a canonical and easier way to run smithy-rs on Lambda [see example].

[see example]: https://github.com/awslabs/smithy-rs/blob/main/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/lambda.rs
"""
references = ["smithy-rs#1551"]
meta = { "breaking" = false, "tada" = true, "bug" = false, "target" = "server" }
author = "hugobast"

[[smithy-rs]]
message = """
Lossy converters into integer types for `aws_smithy_types::Number` have been
removed. Lossy converters into floating point types for
`aws_smithy_types::Number` have been suffixed with `_lossy`. If you were
directly using the integer lossy converters, we recommend you use the safe
converters.
_Before:_
```rust
fn f1(n: aws_smithy_types::Number) {
    let foo: f32 = n.to_f32(); // Lossy conversion!
    let bar: u32 = n.to_u32(); // Lossy conversion!
}
```
_After:_
```rust
fn f1(n: aws_smithy_types::Number) {
    use std::convert::TryInto; // Unnecessary import if you're using Rust 2021 edition.
    let foo: f32 = n.try_into().expect("lossy conversion detected"); // Or handle the error instead of panicking.
    // You can still do lossy conversions, but only into floating point types.
    let foo: f32 = n.to_f32_lossy();
    // To lossily convert into integer types, use an `as` cast directly.
    let bar: u32 = n as u32; // Lossy conversion!
}
```
"""
references = ["smithy-rs#1274"]
meta = { "breaking" = true, "tada" = false, "bug" = true, "target" = "all" }
author = "david-perez"

[[aws-sdk-rust]]
message = """
Lossy converters into integer types for `aws_smithy_types::Number` have been
removed. Lossy converters into floating point types for
`aws_smithy_types::Number` have been suffixed with `_lossy`. If you were
directly using the integer lossy converters, we recommend you use the safe
converters.
_Before:_
```rust
fn f1(n: aws_smithy_types::Number) {
    let foo: f32 = n.to_f32(); // Lossy conversion!
    let bar: u32 = n.to_u32(); // Lossy conversion!
}
```
_After:_
```rust
fn f1(n: aws_smithy_types::Number) {
    use std::convert::TryInto; // Unnecessary import if you're using Rust 2021 edition.
    let foo: f32 = n.try_into().expect("lossy conversion detected"); // Or handle the error instead of panicking.
    // You can still do lossy conversions, but only into floating point types.
    let foo: f32 = n.to_f32_lossy();
    // To lossily convert into integer types, use an `as` cast directly.
    let bar: u32 = n as u32; // Lossy conversion!
}
```
"""
references = ["smithy-rs#1274"]
meta = { "breaking" = true, "tada" = false, "bug" = true }
author = "david-perez"
