From 82f7bb7de2d9ac7d890e75179209416935be0bdd Mon Sep 17 00:00:00 2001 From: Miles Ziemer Date: Tue, 12 Dec 2023 12:58:53 -0500 Subject: [PATCH] Add protocol tests for 0/false in query params --- .../model/restJson1/http-query.smithy | 16 ++++++++++++++++ .../model/restXml/http-query.smithy | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/smithy-aws-protocol-tests/model/restJson1/http-query.smithy b/smithy-aws-protocol-tests/model/restJson1/http-query.smithy index dea2c2a7f4e..995b1890441 100644 --- a/smithy-aws-protocol-tests/model/restJson1/http-query.smithy +++ b/smithy-aws-protocol-tests/model/restJson1/http-query.smithy @@ -218,6 +218,22 @@ apply AllQueryStringTypes @httpRequestTests([ } } }, + { + id: "RestJsonZeroAndFalseQueryValues" + documentation: "Query values of 0 and false are serialized" + protocol: restJson1 + method: "GET" + uri: "/AllQueryStringTypesInput" + body: "" + queryParams: [ + "Integer=0" + "Boolean=false" + ] + params: { + queryInteger: 0 + queryBoolean: false + } + } ]) @suppress(["HttpQueryParamsTrait"]) diff --git a/smithy-aws-protocol-tests/model/restXml/http-query.smithy b/smithy-aws-protocol-tests/model/restXml/http-query.smithy index 98f57de8ed6..017003b411e 100644 --- a/smithy-aws-protocol-tests/model/restXml/http-query.smithy +++ b/smithy-aws-protocol-tests/model/restXml/http-query.smithy @@ -180,6 +180,22 @@ apply AllQueryStringTypes @httpRequestTests([ queryDouble: "-Infinity", } }, + { + id: "RestXmlZeroAndFalseQueryValues" + documentation: "Query values of 0 and false are serialized" + protocol: restXml + method: "GET" + uri: "/AllQueryStringTypesInput" + body: "" + queryParams: [ + "Integer=0" + "Boolean=false" + ] + params: { + queryInteger: 0 + queryBoolean: false + } + } ]) @suppress(["HttpQueryParamsTrait"])