Skip to content

Commit

Permalink
chore: resolve smithy build warnings to reduce build noise (#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpmellema authored Mar 13, 2024
1 parent 50ee058 commit 9b911fb
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ service HttpApiKeyAuthService {
]
}

@readonly
@http(method: "GET", uri: "/OnlyHttpApiKeyAuth")
@auth([httpApiKeyAuth])
operation OnlyHttpApiKeyAuth {}

@readonly
@http(method: "GET", uri: "/OnlyHttpApiKeyAuthOptional")
@auth([httpApiKeyAuth])
@optionalAuth
operation OnlyHttpApiKeyAuthOptional {}

@readonly
@http(method: "GET", uri: "/SameAsService")
operation SameAsService {}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ service HttpBearerAuthService {
]
}

@readonly
@http(method: "GET", uri: "/OnlyHttpBearerAuth")
@auth([httpBearerAuth])
operation OnlyHttpBearerAuth {}

@readonly
@http(method: "GET", uri: "/OnlyHttpBearerAuthOptional")
@auth([httpBearerAuth])
@optionalAuth
operation OnlyHttpBearerAuthOptional {}

@readonly
@http(method: "GET", uri: "/SameAsService")
operation SameAsService {}
19 changes: 19 additions & 0 deletions smithy-typescript-codegen-test/model/weather/main.smithy
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
$version: "2.0"

metadata suppressions = [
{
id: "UnstableTrait.smithy"
namespace: "example.weather"
reason: "Unstable traits are expected in test model, do not emit warning on them."
}
]

namespace example.weather

use aws.auth#sigv4
Expand Down Expand Up @@ -39,50 +47,61 @@ service Weather {
]
}

@readonly
@http(method: "GET", uri: "/OnlyHttpApiKeyAuth")
@auth([httpApiKeyAuth])
operation OnlyHttpApiKeyAuth {}

@readonly
@http(method: "GET", uri: "/OnlyHttpBearerAuth")
@auth([httpBearerAuth])
operation OnlyHttpBearerAuth {}

@readonly
@http(method: "GET", uri: "/OnlySigv4Auth")
@auth([sigv4])
operation OnlySigv4Auth {}

@readonly
@http(method: "GET", uri: "/OnlyHttpApiKeyAndBearerAuth")
@auth([httpApiKeyAuth, httpBearerAuth])
operation OnlyHttpApiKeyAndBearerAuth {}

@readonly
@http(method: "GET", uri: "/OnlyHttpApiKeyAndBearerAuthReversed")
@auth([httpBearerAuth, httpApiKeyAuth])
operation OnlyHttpApiKeyAndBearerAuthReversed {}

@readonly
@http(method: "GET", uri: "/OnlyHttpApiKeyAuthOptional")
@auth([httpApiKeyAuth])
@optionalAuth
operation OnlyHttpApiKeyAuthOptional {}

@readonly
@http(method: "GET", uri: "/OnlyHttpBearerAuthOptional")
@auth([httpBearerAuth])
@optionalAuth
operation OnlyHttpBearerAuthOptional {}

@readonly
@http(method: "GET", uri: "/OnlySigv4AuthOptional")
@auth([sigv4])
@optionalAuth
operation OnlySigv4AuthOptional {}

@readonly
@http(method: "GET", uri: "/OnlyFakeAuth")
@auth([fakeAuth])
operation OnlyFakeAuth {}

@readonly
@http(method: "GET", uri: "/OnlyFakeAuthOptional")
@auth([fakeAuth])
@optionalAuth
operation OnlyFakeAuthOptional {}

@readonly
@http(method: "GET", uri: "/SameAsService")
operation SameAsService {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$version: "1.0"
$version: "2.0"

namespace example.weather.nested.more

Expand Down
2 changes: 1 addition & 1 deletion smithy-typescript-codegen-test/model/weather/nested.smithy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$version: "1.0"
$version: "2.0"

namespace example.weather.nested

Expand Down

0 comments on commit 9b911fb

Please sign in to comment.