Skip to content

Commit

Permalink
Fix RestJsonZeroAndFalseQueryValues protocol test (#2167)
Browse files Browse the repository at this point in the history
Intially added in #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 #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
```
  • Loading branch information
milesziemer authored Mar 5, 2024
1 parent e9cca36 commit 73936a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smithy-aws-protocol-tests/model/restJson1/http-query.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ apply AllQueryStringTypes @httpRequestTests([
queryInteger: 0
queryBoolean: false
queryParamsMapOfStringList: {
queryInteger: ["0"]
queryBoolean: ["false"]
"Integer": ["0"]
"Boolean": ["false"]
}
}
}
Expand Down

0 comments on commit 73936a8

Please sign in to comment.