Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changelog/1758067735.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
applies_to: ["client"]
authors: ["haydenbaker"]
references: ["smithy-rs#4226"]
breaking: false
new_feature: false
bug_fix: true
---
Fixed problematic assertion on HttpApiKeyAuthTrait `scheme`, which was causing client-codegen to fail when the correct settings for api-key based auth were set.
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,7 @@ private class HttpAuthServiceRuntimePluginCustomization(
val trait = serviceShape.getTrait<HttpApiKeyAuthTrait>()!!
val location =
when (trait.`in`!!) {
HttpApiKeyAuthTrait.Location.HEADER -> {
check(trait.scheme.isPresent) {
"A scheme is required for `@httpApiKey` when `in` is set to `header`"
}
"Header"
}

HttpApiKeyAuthTrait.Location.HEADER -> "Header"
HttpApiKeyAuthTrait.Location.QUERY -> "Query"
}

Expand Down
Loading