From c13622c804deb476166f15117dcfe0f1466053a7 Mon Sep 17 00:00:00 2001 From: JordonPhillips Date: Wed, 31 Mar 2021 17:56:45 +0200 Subject: [PATCH] Fix query string-string map protocol tests --- .../model/restJson1/http-query.smithy | 19 ++++++++++++++++--- .../model/restXml/http-query.smithy | 18 +++++++++++++++--- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/smithy-aws-protocol-tests/model/restJson1/http-query.smithy b/smithy-aws-protocol-tests/model/restJson1/http-query.smithy index 1e389f886a5..7b52d5b77a2 100644 --- a/smithy-aws-protocol-tests/model/restJson1/http-query.smithy +++ b/smithy-aws-protocol-tests/model/restJson1/http-query.smithy @@ -29,6 +29,7 @@ operation AllQueryStringTypes { } apply AllQueryStringTypes @httpRequestTests([ + { id: "RestJsonAllQueryStringTypes", documentation: "Serializes query string parameters with all supported types", @@ -71,8 +72,6 @@ apply AllQueryStringTypes @httpRequestTests([ "EnumList=Foo", "EnumList=Baz", "EnumList=Bar", - "QueryParamsStringKeyA=Foo", - "QueryParamsStringKeyB=Bar", ], params: { queryString: "Hello there", @@ -93,9 +92,23 @@ apply AllQueryStringTypes @httpRequestTests([ queryTimestampList: [1, 2, 3], queryEnum: "Foo", queryEnumList: ["Foo", "Baz", "Bar"], + } + }, + { + id: "RestJsonQueryStringMap", + documentation: "Handles query string maps", + protocol: restJson1, + method: "GET", + uri: "/AllQueryStringTypesInput", + body: "", + queryParams: [ + "QueryParamsStringKeyA=Foo", + "QueryParamsStringKeyB=Bar", + ], + params: { queryParamsMapOfStrings: { "QueryParamsStringKeyA": "Foo", - "QueryParamsStringKeyB": "Bar" + "QueryParamsStringKeyB": "Bar", }, } } diff --git a/smithy-aws-protocol-tests/model/restXml/http-query.smithy b/smithy-aws-protocol-tests/model/restXml/http-query.smithy index 4809f85a46c..ffd8c1057e2 100644 --- a/smithy-aws-protocol-tests/model/restXml/http-query.smithy +++ b/smithy-aws-protocol-tests/model/restXml/http-query.smithy @@ -71,8 +71,6 @@ apply AllQueryStringTypes @httpRequestTests([ "EnumList=Foo", "EnumList=Baz", "EnumList=Bar", - "QueryParamsStringKeyA=Foo", - "QueryParamsStringKeyB=Bar", ], params: { queryString: "Hello there", @@ -93,9 +91,23 @@ apply AllQueryStringTypes @httpRequestTests([ queryTimestampList: [1, 2, 3], queryEnum: "Foo", queryEnumList: ["Foo", "Baz", "Bar"], + } + }, + { + id: "RestXmlQueryStringMap", + documentation: "Handles query string maps", + protocol: restXml, + method: "GET", + uri: "/AllQueryStringTypesInput", + body: "", + queryParams: [ + "QueryParamsStringKeyA=Foo", + "QueryParamsStringKeyB=Bar", + ], + params: { queryParamsMapOfStrings: { "QueryParamsStringKeyA": "Foo", - "QueryParamsStringKeyB": "Bar" + "QueryParamsStringKeyB": "Bar", }, } }