Unverified Commit 70252531 authored by 82marbag's avatar 82marbag Committed by GitHub
Browse files

Protocol tests for ACCEPT header with * (#1648)



* Protocol tests for ACCEPT header with *

Signed-off-by: default avatarDaniele Ahmed <ahmeddan@amazon.de>
parent 613da815
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ service MiscService {
        ResponseCodeRequiredOperation,
        ResponseCodeHttpFallbackOperation,
        ResponseCodeDefaultOperation,
        AcceptHeaderStarService,
    ],
}

@@ -199,3 +200,33 @@ structure ResponseCodeRequiredOutput {
    @httpResponseCode
    responseCode: Integer,
}

// TODO(https://github.com/awslabs/smithy/pull/1365): remove when these tests are in smithy
@http(method: "GET", uri: "/test-accept-header")
@httpRequestTests([
    {
        id: "AcceptHeaderStarRequestTest",
        protocol: "aws.protocols#restJson1",
        uri: "/test-accept-header",
        headers: {
            "Accept": "application/*",
        },
        params: {},
        body: "{}",
        method: "GET",
        appliesTo: "server",
    },
    {
        id: "AcceptHeaderStarStarRequestTest",
        protocol: "aws.protocols#restJson1",
        uri: "/test-accept-header",
        headers: {
            "Accept": "*/*",
        },
        params: {},
        body: "{}",
        method: "GET",
        appliesTo: "server",
    }
])
operation AcceptHeaderStarService {}