Skip to content

Commit 831a378

Browse files
author
Steven Yuan
committed
feat(experimentalIdentityAndAuth): add @customAuth auth scheme to generic tests
1 parent d3071d0 commit 831a378

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

smithy-typescript-codegen-test/model/main.smithy

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ use smithy.test#httpRequestTests
77
use smithy.test#httpResponseTests
88
use smithy.waiters#waitable
99

10+
@authDefinition
11+
@trait
12+
structure customAuth {}
13+
1014
/// Provides weather forecasts.
1115
@fakeProtocol
1216
@httpApiKeyAuth(name: "X-Api-Key", in: "header")
1317
@httpBearerAuth
1418
@sigv4(name: "weather")
19+
@customAuth
1520
@auth([sigv4])
1621
@paginated(inputToken: "nextToken", outputToken: "nextToken", pageSize: "pageSize")
1722
service Weather {
@@ -30,6 +35,8 @@ service Weather {
3035
OnlyHttpApiKeyAndBearerAuthReversed
3136
OnlySigv4Auth
3237
OnlySigv4AuthOptional
38+
OnlyCustomAuth
39+
OnlyCustomAuthOptional
3340
SameAsService
3441
]
3542
}
@@ -69,6 +76,15 @@ operation OnlyHttpBearerAuthOptional {}
6976
@optionalAuth
7077
operation OnlySigv4AuthOptional {}
7178

79+
@http(method: "GET", uri: "/OnlyCustomAuth")
80+
@auth([customAuth])
81+
operation OnlyCustomAuth {}
82+
83+
@http(method: "GET", uri: "/OnlyCustomAuthOptional")
84+
@auth([customAuth])
85+
@optionalAuth
86+
operation OnlyCustomAuthOptional {}
87+
7288
@http(method: "GET", uri: "/SameAsService")
7389
operation SameAsService {}
7490

0 commit comments

Comments
 (0)