Skip to content

Commit

Permalink
Protocol tests for ACCEPT header with *
Browse files Browse the repository at this point in the history
Signed-off-by: Daniele Ahmed <[email protected]>
  • Loading branch information
82marbag authored and Daniele Ahmed committed Aug 18, 2022
1 parent 0d1dc51 commit 5a8166a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions codegen-test/model/misc.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ service MiscService {
ResponseCodeRequiredOperation,
ResponseCodeHttpFallbackOperation,
ResponseCodeDefaultOperation,
AcceptHeaderStarService,
],
}

Expand Down Expand Up @@ -199,3 +200,40 @@ structure ResponseCodeRequiredOutput {
@httpResponseCode
responseCode: Integer,
}

@idempotent
@http(method: "GET", uri: "/test-accept-header")
@documentation("Service accepts `*` in ACCEPT header")
@httpRequestTests([
{
id: "AcceptHeaderStarRequestTest",
protocol: "aws.protocols#restJson1",
uri: "/test-accept-header",
headers: {
"Accept": "application/*",
},
params: {},
body: "{}",
method: "GET",
},
{
id: "AcceptHeaderStarStarRequestTest",
protocol: "aws.protocols#restJson1",
uri: "/test-accept-header",
headers: {
"Accept": "*/*",
},
params: {},
body: "{}",
method: "GET",
}
])
operation AcceptHeaderStarService {
input: AcceptHeaderStarServiceInput,
output: AcceptHeaderStarServiceOutput,
}

@output
structure AcceptHeaderStarServiceOutput {}
@input
structure AcceptHeaderStarServiceInput {}

0 comments on commit 5a8166a

Please sign in to comment.