Skip to content

Commit a239b87

Browse files
Move accept/content-type tests
1 parent c069115 commit a239b87

File tree

1 file changed

+36
-34
lines changed

1 file changed

+36
-34
lines changed

smithy-aws-protocol-tests/model/restJson1/http-payload.smithy

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -56,45 +56,14 @@ apply HttpPayloadTraits @httpRequestTests([
5656
foo: "Foo"
5757
}
5858
},
59-
])
60-
61-
apply HttpPayloadTraits @httpResponseTests([
62-
{
63-
id: "RestJsonHttpPayloadTraitsWithBlob",
64-
documentation: "Serializes a blob in the HTTP payload",
65-
protocol: restJson1,
66-
code: 200,
67-
body: "blobby blob blob",
68-
bodyMediaType: "application/octet-stream",
69-
headers: {
70-
"X-Foo": "Foo"
71-
},
72-
params: {
73-
foo: "Foo",
74-
blob: "blobby blob blob"
75-
}
76-
},
77-
{
78-
id: "RestJsonHttpPayloadTraitsWithNoBlobBody",
79-
documentation: "Serializes an empty blob in the HTTP payload",
80-
protocol: restJson1,
81-
code: 200,
82-
body: "",
83-
bodyMediaType: "application/octet-stream",
84-
headers: {
85-
"X-Foo": "Foo"
86-
},
87-
params: {
88-
foo: "Foo"
89-
}
90-
},
9159
{
9260
id: "RestJsonHttpPayloadTraitsWithBlobAcceptsAllContentTypes",
9361
documentation: """
9462
Servers must accept any content type for blob inputs
9563
without the media type trait.""",
9664
protocol: restJson1,
97-
code: 200,
65+
method: "POST",
66+
uri: "/HttpPayloadTraits",
9867
body: "This is definitely a jpeg",
9968
bodyMediaType: "application/octet-stream",
10069
headers: {
@@ -113,7 +82,8 @@ apply HttpPayloadTraits @httpResponseTests([
11382
Servers must accept any accept header for blob inputs
11483
without the media type trait.""",
11584
protocol: restJson1,
116-
code: 200,
85+
method: "POST",
86+
uri: "/HttpPayloadTraits",
11787
body: "This is definitely a jpeg",
11888
bodyMediaType: "application/octet-stream",
11989
headers: {
@@ -128,6 +98,38 @@ apply HttpPayloadTraits @httpResponseTests([
12898
},
12999
])
130100

101+
apply HttpPayloadTraits @httpResponseTests([
102+
{
103+
id: "RestJsonHttpPayloadTraitsWithBlob",
104+
documentation: "Serializes a blob in the HTTP payload",
105+
protocol: restJson1,
106+
code: 200,
107+
body: "blobby blob blob",
108+
bodyMediaType: "application/octet-stream",
109+
headers: {
110+
"X-Foo": "Foo"
111+
},
112+
params: {
113+
foo: "Foo",
114+
blob: "blobby blob blob"
115+
}
116+
},
117+
{
118+
id: "RestJsonHttpPayloadTraitsWithNoBlobBody",
119+
documentation: "Serializes an empty blob in the HTTP payload",
120+
protocol: restJson1,
121+
code: 200,
122+
body: "",
123+
bodyMediaType: "application/octet-stream",
124+
headers: {
125+
"X-Foo": "Foo"
126+
},
127+
params: {
128+
foo: "Foo"
129+
}
130+
},
131+
])
132+
131133
structure HttpPayloadTraitsInputOutput {
132134
@httpHeader("X-Foo")
133135
foo: String,

0 commit comments

Comments
 (0)