smithy-lang / smithy

Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
https://smithy.io
Apache License 2.0
1.77k stars 208 forks source link

Add protocol tests relating to `Content-Type` and `@httpPayload` #2314

Closed david-perez closed 3 months ago

david-perez commented 3 months ago

Add protocol tests relating to Content-Type and @httpPayload

Initial motivation for this stems off #2310, but for when the input is @httpPayload-bound. It's important that we test Content-Type specifically with @httpPayload operations, because the header can be checked without having to inspect the body, and because the spec has special provisions (https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html#content-type).

There were no protocol tests exercising Content-Type when the input is @httpPayload-bound:

Testing


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.