Loading CHANGELOG.next.toml +5 −0 Original line number Diff line number Diff line Loading @@ -98,3 +98,8 @@ references = ["smithy-rs#1935"] meta = { "breaking" = true, "tada" = false, "bug" = false } author = "jdisanti" [[smithy-rs]] message = "Upgrade to Smithy 1.26.2" references = ["smithy-rs#1972"] meta = { "breaking" = false, "tada" = false, "bug" = false } author = "rcoh" codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +0 −1 Original line number Diff line number Diff line Loading @@ -903,7 +903,6 @@ class ServerProtocolTestGenerator( private val ExpectFail: Set<FailingTest> = setOf( // Pending merge from the Smithy team: see https://github.com/awslabs/smithy/pull/1477. FailingTest(RestJson, "RestJsonWithPayloadExpectsImpliedContentType", TestType.MalformedRequest), FailingTest(RestJson, "RestJsonBodyMalformedMapNullKey", TestType.MalformedRequest), // Pending resolution from the Smithy team, see https://github.com/awslabs/smithy/issues/1068. FailingTest(RestJson, "RestJsonHttpWithHeadersButNoPayload", TestType.Request), Loading gradle.properties +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ kotlin.code.style=official # codegen smithyGradlePluginVersion=0.6.0 smithyVersion=1.26.0 smithyVersion=1.26.2 # kotlin kotlinVersion=1.6.21 Loading rust-runtime/aws-smithy-query/src/lib.rs +17 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ impl<'a> QueryWriter<'a> { } } #[must_use] pub struct QueryMapWriter<'a> { output: &'a mut String, prefix: Cow<'a, str>, Loading Loading @@ -89,6 +90,7 @@ impl<'a> QueryMapWriter<'a> { } } #[must_use] pub struct QueryListWriter<'a> { output: &'a mut String, prefix: Cow<'a, str>, Loading Loading @@ -132,10 +134,15 @@ impl<'a> QueryListWriter<'a> { } pub fn finish(self) { // 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 { QueryValueWriter::new(self.output, self.prefix).write_param_name(); } } } #[must_use] pub struct QueryValueWriter<'a> { output: &'a mut String, prefix: Cow<'a, str>, Loading Loading @@ -229,6 +236,15 @@ mod tests { assert_eq!("Action=SomeAction&Version=1.0", out); } #[test] fn query_list_writer_empty_list() { let mut out = String::new(); let mut writer = QueryWriter::new(&mut out, "SomeAction", "1.0"); writer.prefix("myList").start_list(false, None).finish(); writer.finish(); assert_eq!("Action=SomeAction&Version=1.0&myList=", out); } #[test] fn maps() { let mut out = String::new(); Loading Loading
CHANGELOG.next.toml +5 −0 Original line number Diff line number Diff line Loading @@ -98,3 +98,8 @@ references = ["smithy-rs#1935"] meta = { "breaking" = true, "tada" = false, "bug" = false } author = "jdisanti" [[smithy-rs]] message = "Upgrade to Smithy 1.26.2" references = ["smithy-rs#1972"] meta = { "breaking" = false, "tada" = false, "bug" = false } author = "rcoh"
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +0 −1 Original line number Diff line number Diff line Loading @@ -903,7 +903,6 @@ class ServerProtocolTestGenerator( private val ExpectFail: Set<FailingTest> = setOf( // Pending merge from the Smithy team: see https://github.com/awslabs/smithy/pull/1477. FailingTest(RestJson, "RestJsonWithPayloadExpectsImpliedContentType", TestType.MalformedRequest), FailingTest(RestJson, "RestJsonBodyMalformedMapNullKey", TestType.MalformedRequest), // Pending resolution from the Smithy team, see https://github.com/awslabs/smithy/issues/1068. FailingTest(RestJson, "RestJsonHttpWithHeadersButNoPayload", TestType.Request), Loading
gradle.properties +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ kotlin.code.style=official # codegen smithyGradlePluginVersion=0.6.0 smithyVersion=1.26.0 smithyVersion=1.26.2 # kotlin kotlinVersion=1.6.21 Loading
rust-runtime/aws-smithy-query/src/lib.rs +17 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ impl<'a> QueryWriter<'a> { } } #[must_use] pub struct QueryMapWriter<'a> { output: &'a mut String, prefix: Cow<'a, str>, Loading Loading @@ -89,6 +90,7 @@ impl<'a> QueryMapWriter<'a> { } } #[must_use] pub struct QueryListWriter<'a> { output: &'a mut String, prefix: Cow<'a, str>, Loading Loading @@ -132,10 +134,15 @@ impl<'a> QueryListWriter<'a> { } pub fn finish(self) { // 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 { QueryValueWriter::new(self.output, self.prefix).write_param_name(); } } } #[must_use] pub struct QueryValueWriter<'a> { output: &'a mut String, prefix: Cow<'a, str>, Loading Loading @@ -229,6 +236,15 @@ mod tests { assert_eq!("Action=SomeAction&Version=1.0", out); } #[test] fn query_list_writer_empty_list() { let mut out = String::new(); let mut writer = QueryWriter::new(&mut out, "SomeAction", "1.0"); writer.prefix("myList").start_list(false, None).finish(); writer.finish(); assert_eq!("Action=SomeAction&Version=1.0&myList=", out); } #[test] fn maps() { let mut out = String::new(); Loading