Unverified Commit c8a940be authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

Unknown variants (#818)

* Add symbol provider support for renaming union variants

* Generate errors when serializing unknown variants in JSON

* Add support for serializing Unknown variants in XML

* Support optionally generating the unknown variant

* Add support for parsing unknown JSON variants

* Add unknown union support to XML

* fixup tests & clippy

* backup changes to mk-generated

* Support the unknown variant for event streams

* fix compilation warning

* fix awsquery serializer tests

* Remove conversion & lint supression

* Remove unused custom attributes

* remove some more pointless conversions

* Fix test indentation

* CR feedback

* Update Changelogs

* Remove usages of toPascalCase

* Fix eventstream error message

* Fix braces in server codegen

* Fix doublequoted string issue
parent fa0567bd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ v0.27.0-alpha.1 (November 3rd, 2021)
- `moduleDescription` in `smithy-build.json` settings is now optional
- Upgrade to Smithy 1.12
- `hyper::Error(IncompleteMessage)` will now be retried (smithy-rs#815)
- Unions will optionally generate an `Unknown` variant to support parsing variants that don't exist on the client. These variants will fail to serialize if they are ever included in requests.
- Fix generated docs on unions. (smithy-rs#826)

v0.27 (October 20th, 2021)
+2 −1
Original line number Diff line number Diff line
@@ -9,11 +9,12 @@ v0.0.23-alpha (November 3rd, 2021)
- :bug: Fix `native-tls` feature in `aws-config` (aws-sdk-rust#265, smithy-rs#803)
- Add example to aws-sig-auth for generating an IAM Token for RDS (smithy-rs#811, aws-sdk-rust#147)
- :bug: `hyper::Error(IncompleteMessage)` will now be retried (smithy-rs#815)
- :bug: S3 request metadata signing now correctly trims headers fixing [problems like this](https://github.com/awslabs/aws-sdk-rust/issues/248) (smithy-rs#761)
- All unions (eg. `dynamodb::model::AttributeValue`) now include an additional `Unknown` variant. These support cases where a new union variant has been added on the server but the client has not been updated.
- :bug: Fix generated docs on unions like `dynamodb::AttributeValue`. (smithy-rs#826)

**Breaking Changes**
- `<operation>.make_operation(&config)` is now an `async` function for all operations. Code should be updated to call `.await`. This will only impact users using the low-level API. (smithy-rs#797)
- :bug: S3 request metadata signing now correctly trims headers fixing [problems like this](https://github.com/awslabs/aws-sdk-rust/issues/248) (smithy-rs#761)

v0.0.22-alpha (October 20th, 2021)
==================================
+2 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ internal class EndpointConfigCustomizationTest {
            it.addDependency(awsTypes(AwsTestRuntimeConfig))
            it.addDependency(CargoDependency.Http)
            it.unitTest(
                "region_override",
                """
                use aws_types::region::Region;
                use http::Uri;
@@ -147,6 +148,7 @@ internal class EndpointConfigCustomizationTest {
            it.addDependency(awsTypes(AwsTestRuntimeConfig))
            it.addDependency(CargoDependency.Http)
            it.unitTest(
                "global_services",
                """
                use aws_types::region::Region;
                use http::Uri;
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ internal class SigV4SigningCustomizationTest {
        )
        project.lib {
            it.unitTest(
                "signing_service_override",
                """
                let conf = crate::config::Config::builder().build();
                assert_eq!(conf.signing_service(), "test-service");
+1 −1
Original line number Diff line number Diff line
@@ -71,6 +71,6 @@ class RustCodegenServerPlugin : SmithyBuildPlugin {
                .let { StreamingShapeMetadataProvider(it, model) }
                // Rename shapes that clash with Rust reserved words & and other SDK specific features e.g. `send()` cannot
                // be the name of an operation input
                .let { RustReservedWordSymbolProvider(it) }
                .let { RustReservedWordSymbolProvider(it, model) }
    }
}
Loading