From 29c247ffb4a4df710ed9217132ec106ac180bed5 Mon Sep 17 00:00:00 2001 From: Jason Del Ponte Date: Tue, 12 Jan 2021 09:07:58 -0800 Subject: [PATCH] Add test case for XML Attribute with xml namespace on tag Adds additional protocol tests for member bound to XML attribute within a struct that also has an XML namespace. Related to https://github.com/aws/smithy-go/pull/255, https://github.com/aws/aws-sdk-go-v2/pull/1034, https://github.com/aws/aws-sdk-go-v2/issues/1013 --- .../model/restXmlWithNamespace/main.smithy | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/smithy-aws-protocol-tests/model/restXmlWithNamespace/main.smithy b/smithy-aws-protocol-tests/model/restXmlWithNamespace/main.smithy index 0cb5c062bcd..d3e43e03b68 100644 --- a/smithy-aws-protocol-tests/model/restXmlWithNamespace/main.smithy +++ b/smithy-aws-protocol-tests/model/restXmlWithNamespace/main.smithy @@ -52,6 +52,7 @@ apply SimpleScalarProperties @httpRequestTests([ 4 5.5 6.5 + """, bodyMediaType: "application/xml", @@ -70,6 +71,9 @@ apply SimpleScalarProperties @httpRequestTests([ longValue: 4, floatValue: 5.5, doubleValue: 6.5, + Nested: { + attrField: "nestedAttrValue", + }, } } ]) @@ -91,6 +95,7 @@ apply SimpleScalarProperties @httpResponseTests([ 4 5.5 6.5 + """, bodyMediaType: "application/xml", @@ -109,6 +114,9 @@ apply SimpleScalarProperties @httpResponseTests([ longValue: 4, floatValue: 5.5, doubleValue: 6.5, + Nested: { + attrField: "nestedAttrValue", + }, } } ]) @@ -126,6 +134,15 @@ structure SimpleScalarPropertiesInputOutput { longValue: Long, floatValue: Float, + Nested: NestedWithNamespace, + @xmlName("DoubleDribble") doubleValue: Double, } + +@xmlNamespace(prefix: "xsi", uri: "https://example.com") +structure NestedWithNamespace { + @xmlAttribute + @xmlName("someName") + attrField: String, +}