Skip to content

Commit

Permalink
Add test case for XML Attribute with xml namespace on tag
Browse files Browse the repository at this point in the history
Adds additional protocol tests for member bound to XML attribute within
a struct that also has an XML namespace.

Related to aws/smithy-go#255, aws/aws-sdk-go-v2#1034, aws/aws-sdk-go-v2#1013
  • Loading branch information
jasdel committed Jan 12, 2021
1 parent bd14b65 commit 29c247f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions smithy-aws-protocol-tests/model/restXmlWithNamespace/main.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ apply SimpleScalarProperties @httpRequestTests([
<longValue>4</longValue>
<floatValue>5.5</floatValue>
<DoubleDribble>6.5</DoubleDribble>
<Nested xmlns:xsi="https://example.com" xsi:someName="nestedAttrValue"></Nested>
</SimpleScalarPropertiesInputOutput>
""",
bodyMediaType: "application/xml",
Expand All @@ -70,6 +71,9 @@ apply SimpleScalarProperties @httpRequestTests([
longValue: 4,
floatValue: 5.5,
doubleValue: 6.5,
Nested: {
attrField: "nestedAttrValue",
},
}
}
])
Expand All @@ -91,6 +95,7 @@ apply SimpleScalarProperties @httpResponseTests([
<longValue>4</longValue>
<floatValue>5.5</floatValue>
<DoubleDribble>6.5</DoubleDribble>
<Nested xmlns:xsi="https://example.com" xsi:someName="nestedAttrValue"></Nested>
</SimpleScalarPropertiesInputOutput>
""",
bodyMediaType: "application/xml",
Expand All @@ -109,6 +114,9 @@ apply SimpleScalarProperties @httpResponseTests([
longValue: 4,
floatValue: 5.5,
doubleValue: 6.5,
Nested: {
attrField: "nestedAttrValue",
},
}
}
])
Expand All @@ -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,
}

0 comments on commit 29c247f

Please sign in to comment.