From cbcbeef0173085f5398eb4ad445b949af82a8bef Mon Sep 17 00:00:00 2001 From: 82marbag <69267416+82marbag@users.noreply.github.com> Date: Thu, 18 Aug 2022 17:34:44 -0400 Subject: [PATCH 1/3] Add tests for ACCEPT * Signed-off-by: Daniele Ahmed --- .../model/restJson1/http-accept.smithy | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 smithy-aws-protocol-tests/model/restJson1/http-accept.smithy diff --git a/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy b/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy new file mode 100644 index 00000000000..f623d628f74 --- /dev/null +++ b/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy @@ -0,0 +1,46 @@ +$version: "1.0" + +namespace aws.protocoltests.misc + +use aws.protocols#restJson1 +use smithy.test#httpRequestTests +use smithy.test#httpResponseTests + +@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", + appliesTo: "server", + }, + { + id: "AcceptHeaderStarStarRequestTest", + protocol: "aws.protocols#restJson1", + uri: "/test-accept-header", + headers: { + "Accept": "*/*", + }, + params: {}, + body: "{}", + method: "GET", + appliesTo: "server", + } +]) +operation AcceptHeaderStarService { + input: AcceptHeaderStarServiceInput, + output: AcceptHeaderStarServiceOutput, +} + +@output +structure AcceptHeaderStarServiceOutput {} +@input +structure AcceptHeaderStarServiceInput {} From a19c917db3c33e1edb095040eff37e2fc43543e8 Mon Sep 17 00:00:00 2001 From: 82marbag <69267416+82marbag@users.noreply.github.com> Date: Tue, 15 Nov 2022 12:54:22 +0100 Subject: [PATCH 2/3] Replace tabs with spaces Signed-off-by: Daniele Ahmed --- smithy-aws-protocol-tests/model/restJson1/http-accept.smithy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy b/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy index f623d628f74..1350801861b 100644 --- a/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy +++ b/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy @@ -20,7 +20,7 @@ use smithy.test#httpResponseTests params: {}, body: "{}", method: "GET", - appliesTo: "server", + appliesTo: "server", }, { id: "AcceptHeaderStarStarRequestTest", @@ -32,7 +32,7 @@ use smithy.test#httpResponseTests params: {}, body: "{}", method: "GET", - appliesTo: "server", + appliesTo: "server", } ]) operation AcceptHeaderStarService { From ca018f1f81295c11aad4dfd4d11e68800d7a42e5 Mon Sep 17 00:00:00 2001 From: 82marbag <69267416+82marbag@users.noreply.github.com> Date: Fri, 9 Dec 2022 17:44:22 +0100 Subject: [PATCH 3/3] Remove body from requests Signed-off-by: Daniele Ahmed --- smithy-aws-protocol-tests/model/restJson1/http-accept.smithy | 2 -- 1 file changed, 2 deletions(-) diff --git a/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy b/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy index 1350801861b..b21f3ec2814 100644 --- a/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy +++ b/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy @@ -18,7 +18,6 @@ use smithy.test#httpResponseTests "Accept": "application/*", }, params: {}, - body: "{}", method: "GET", appliesTo: "server", }, @@ -30,7 +29,6 @@ use smithy.test#httpResponseTests "Accept": "*/*", }, params: {}, - body: "{}", method: "GET", appliesTo: "server", }