diff --git a/smithy-aws-protocol-tests/model/restJson1/http-string-payload.smithy b/smithy-aws-protocol-tests/model/restJson1/http-string-payload.smithy index 1e6612f458b..8aa1f517b43 100644 --- a/smithy-aws-protocol-tests/model/restJson1/http-string-payload.smithy +++ b/smithy-aws-protocol-tests/model/restJson1/http-string-payload.smithy @@ -8,7 +8,7 @@ use smithy.test#httpResponseTests @http(uri: "/EnumPayload", method: "POST") @httpRequestTests([ { - id: "EnumPayloadRequest", + id: "RestJsonEnumPayloadRequest", uri: "/EnumPayload", body: "enumvalue", params: { payload: "enumvalue" }, @@ -18,7 +18,7 @@ use smithy.test#httpResponseTests ]) @httpResponseTests([ { - id: "EnumPayloadResponse", + id: "RestJsonEnumPayloadResponse", body: "enumvalue", params: { payload: "enumvalue" }, protocol: "aws.protocols#restJson1", @@ -42,7 +42,7 @@ enum StringEnum { @http(uri: "/StringPayload", method: "POST") @httpRequestTests([ { - id: "StringPayloadRequest", + id: "RestJsonStringPayloadRequest", uri: "/StringPayload", body: "rawstring", params: { payload: "rawstring" }, @@ -52,7 +52,7 @@ enum StringEnum { ]) @httpResponseTests([ { - id: "StringPayloadResponse", + id: "RestJsonStringPayloadResponse", body: "rawstring", params: { payload: "rawstring" }, protocol: "aws.protocols#restJson1", diff --git a/smithy-aws-protocol-tests/model/restXml/http-string-payload.smithy b/smithy-aws-protocol-tests/model/restXml/http-string-payload.smithy new file mode 100644 index 00000000000..851e34066e3 --- /dev/null +++ b/smithy-aws-protocol-tests/model/restXml/http-string-payload.smithy @@ -0,0 +1,70 @@ +$version: "2.0" + +namespace aws.protocoltests.restxml + +use smithy.test#httpRequestTests +use smithy.test#httpResponseTests + +@http(uri: "/EnumPayload", method: "POST") +@httpRequestTests([ + { + id: "RestXmlEnumPayloadRequest", + uri: "/EnumPayload", + body: "enumvalue", + params: { payload: "enumvalue" }, + method: "POST", + protocol: "aws.protocols#restXml" + } +]) +@httpResponseTests([ + { + id: "RestXmlEnumPayloadResponse", + body: "enumvalue", + params: { payload: "enumvalue" }, + protocol: "aws.protocols#restXml", + code: 200 + } +]) +operation HttpEnumPayload { + input: EnumPayloadInput, + output: EnumPayloadInput +} + +structure EnumPayloadInput { + @httpPayload + payload: StringEnum +} + +enum StringEnum { + V = "enumvalue" +} + +@http(uri: "/StringPayload", method: "POST") +@httpRequestTests([ + { + id: "RestXmlStringPayloadRequest", + uri: "/StringPayload", + body: "rawstring", + params: { payload: "rawstring" }, + method: "POST", + protocol: "aws.protocols#restXml" + } +]) +@httpResponseTests([ + { + id: "RestXmlStringPayloadResponse", + body: "rawstring", + params: { payload: "rawstring" }, + protocol: "aws.protocols#restXml", + code: 200 + } +]) +operation HttpStringPayload { + input: StringPayloadInput, + output: StringPayloadInput +} + +structure StringPayloadInput { + @httpPayload + payload: String +} diff --git a/smithy-aws-protocol-tests/model/restXml/main.smithy b/smithy-aws-protocol-tests/model/restXml/main.smithy index f0ecc623fa5..3865a2ed397 100644 --- a/smithy-aws-protocol-tests/model/restXml/main.smithy +++ b/smithy-aws-protocol-tests/model/restXml/main.smithy @@ -50,6 +50,8 @@ service RestXml { HttpPayloadTraits, HttpPayloadTraitsWithMediaType, HttpPayloadWithStructure, + HttpEnumPayload, + HttpStringPayload, HttpPayloadWithUnion, HttpPayloadWithXmlName, BodyWithXmlName,