From 73936a8c59666b0f93c756503f7af25e662e76b6 Mon Sep 17 00:00:00 2001 From: Miles Ziemer <45497130+milesziemer@users.noreply.github.com> Date: Tue, 5 Mar 2024 12:12:40 -0500 Subject: [PATCH] Fix `RestJsonZeroAndFalseQueryValues` protocol test (#2167) Intially added in https://github.com/smithy-lang/smithy/pull/2070, `RestJsonZeroAndFalseQueryValues` didn't include the correct params that would be deserialized by a server. Specifically it omitted the `@httpQueryParams` member `queryParamsMapOfStringList`. This member was added back in https://github.com/smithy-lang/smithy/pull/2132, but the map keys corresponded to member names in the input struct, rather than the literal query parameter keys. This meant that _clients_ running this protocol test would actually have a query string of ``` ?Integer=0&Boolean=false&queryInteger=0&queryBoolean=false ``` instead of the intended ``` ?Integer=0&Boolean=false ``` (`forbidQueryParams` wasn't set in the protocol test, so clients wouldn't fail here). _servers_ would fail this test because they'd be expecting to get ``` { queryInteger: 0, queryBoolean: false, queryParamsMapOfStringList: { queryInteger: ["0"], queryBoolean: ["false"] } } ``` from a query string of ``` ?Integer=0&Boolean=false ``` --- smithy-aws-protocol-tests/model/restJson1/http-query.smithy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smithy-aws-protocol-tests/model/restJson1/http-query.smithy b/smithy-aws-protocol-tests/model/restJson1/http-query.smithy index 53a45a24cc7..8bf4abfe4bd 100644 --- a/smithy-aws-protocol-tests/model/restJson1/http-query.smithy +++ b/smithy-aws-protocol-tests/model/restJson1/http-query.smithy @@ -233,8 +233,8 @@ apply AllQueryStringTypes @httpRequestTests([ queryInteger: 0 queryBoolean: false queryParamsMapOfStringList: { - queryInteger: ["0"] - queryBoolean: ["false"] + "Integer": ["0"] + "Boolean": ["false"] } } }