Skip to content

Commit

Permalink
Add more X-Amz-Target for AMS JSON 1.1 protocol tests
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo authored and kstich committed Oct 25, 2022
1 parent 820518f commit 3aed056
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ use smithy.test#httpRequestTests
method: "POST",
uri: "/custom/",
body: "{}",
headers: {
"Content-Type": "application/x-amz-json-1.1",
"X-Amz-Target": "JsonProtocol.HostWithPathOperation",
},
host: "example.com/custom",
appliesTo: "client"
}
Expand Down
8 changes: 8 additions & 0 deletions smithy-aws-protocol-tests/model/awsJson1_1/endpoints.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ use smithy.test#httpRequestTests
method: "POST",
uri: "/",
body: "{}",
headers: {
"Content-Type": "application/x-amz-json-1.1",
"X-Amz-Target": "JsonProtocol.EndpointOperation",
},
host: "example.com",
resolvedHost: "foo.example.com",
}
Expand All @@ -38,6 +42,10 @@ operation EndpointOperation {}
uri: "/",
body: "{\"label\": \"bar\"}",
bodyMediaType: "application/json",
headers: {
"Content-Type": "application/x-amz-json-1.1",
"X-Amz-Target": "JsonProtocol.EndpointWithHostLabelOperation",
},
host: "example.com",
resolvedHost: "foo.bar.example.com",
params: {
Expand Down
5 changes: 4 additions & 1 deletion smithy-aws-protocol-tests/model/awsJson1_1/null.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ use smithy.test#httpResponseTests
protocol: awsJson1_1,
body: "{}",
bodyMediaType: "application/json",
headers: {"Content-Type": "application/x-amz-json-1.1"},
headers: {
"Content-Type": "application/x-amz-json-1.1",
"X-Amz-Target": "JsonProtocol.NullOperation",
},
params: {
string: null
},
Expand Down

0 comments on commit 3aed056

Please sign in to comment.