From 831a378ccffc34482b430ceea01f07ca8c51d96a Mon Sep 17 00:00:00 2001 From: Steven Yuan Date: Fri, 1 Sep 2023 15:32:13 -0700 Subject: [PATCH] feat(experimentalIdentityAndAuth): add `@customAuth` auth scheme to generic tests --- smithy-typescript-codegen-test/model/main.smithy | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/smithy-typescript-codegen-test/model/main.smithy b/smithy-typescript-codegen-test/model/main.smithy index 58e4335555c..ea2c268ace8 100644 --- a/smithy-typescript-codegen-test/model/main.smithy +++ b/smithy-typescript-codegen-test/model/main.smithy @@ -7,11 +7,16 @@ use smithy.test#httpRequestTests use smithy.test#httpResponseTests use smithy.waiters#waitable +@authDefinition +@trait +structure customAuth {} + /// Provides weather forecasts. @fakeProtocol @httpApiKeyAuth(name: "X-Api-Key", in: "header") @httpBearerAuth @sigv4(name: "weather") +@customAuth @auth([sigv4]) @paginated(inputToken: "nextToken", outputToken: "nextToken", pageSize: "pageSize") service Weather { @@ -30,6 +35,8 @@ service Weather { OnlyHttpApiKeyAndBearerAuthReversed OnlySigv4Auth OnlySigv4AuthOptional + OnlyCustomAuth + OnlyCustomAuthOptional SameAsService ] } @@ -69,6 +76,15 @@ operation OnlyHttpBearerAuthOptional {} @optionalAuth operation OnlySigv4AuthOptional {} +@http(method: "GET", uri: "/OnlyCustomAuth") +@auth([customAuth]) +operation OnlyCustomAuth {} + +@http(method: "GET", uri: "/OnlyCustomAuthOptional") +@auth([customAuth]) +@optionalAuth +operation OnlyCustomAuthOptional {} + @http(method: "GET", uri: "/SameAsService") operation SameAsService {}