Skip to content

Commit

Permalink
Add content-type to JSON 1.1 protocol tests
Browse files Browse the repository at this point in the history
Updates the protocol tests for JSON 1.1 to include the Content-Type
header for request and response serializations.
  • Loading branch information
jasdel authored and JordonPhillips committed Jul 13, 2020
1 parent 32ca3c1 commit 5472b7a
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smithy-aws-protocol-tests/model/awsJson1_1/documents.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ apply PutAndGetInlineDocuments @httpRequestTests([
"inlineDocument": {"foo": "bar"}
}""",
bodyMediaType: "application/json",
headers: {"Content-Type": "application/json"},
headers: {"Content-Type": "application/x-amz-json-1.1"},
requireHeaders: [
"Content-Length"
],
Expand All @@ -55,7 +55,7 @@ apply PutAndGetInlineDocuments @httpResponseTests([
"inlineDocument": {"foo": "bar"}
}""",
bodyMediaType: "application/json",
headers: {"Content-Type": "application/json"},
headers: {"Content-Type": "application/x-amz-json-1.1"},
params: {
inlineDocument: {
foo: "bar"
Expand Down
2 changes: 2 additions & 0 deletions smithy-aws-protocol-tests/model/awsJson1_1/enums.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ apply JsonEnums @httpRequestTests([
"zero": "0"
}
}""",
headers: {"Content-Type": "application/x-amz-json-1.1"},
bodyMediaType: "application/json",
params: {
fooEnum1: "Foo",
Expand Down Expand Up @@ -81,6 +82,7 @@ apply JsonEnums @httpResponseTests([
"zero": "0"
}
}""",
headers: {"Content-Type": "application/x-amz-json-1.1"},
bodyMediaType: "application/json",
params: {
fooEnum1: "Foo",
Expand Down
Loading

0 comments on commit 5472b7a

Please sign in to comment.