fix: handle clientContextParam collisions with builtin config keys #1788
Merged
fix: handle clientContextParam collisions with builtin config keys #1788
Conversation
4a0b1ea to
c0cc0c7
Compare
f3ea1fe to
13fd0f0
Compare
9117008 to
1fc37f8
Compare
kuhe
requested changes
Dec 1, 2025
ef3cda8 to
c5f0d86
Compare
kuhe
reviewed
Dec 1, 2025
kuhe
reviewed
Dec 1, 2025
kuhe
reviewed
Dec 1, 2025
kuhe
reviewed
Dec 1, 2025
kuhe
reviewed
Dec 2, 2025
| if (isClientContextParam) { | ||
| // For client context parameters, check clientContextParams first | ||
| const clientContextParams = config.clientContextParams as Record<string, unknown> | undefined; | ||
| const nestedValue: unknown = clientContextParams?.[configKey] ?? clientContextParams?.[canonicalEndpointParamKey]; |
Contributor
There was a problem hiding this comment.
is there any case where the nested object does not use the canonical parameter key?
If not, there's no reason to check the configKey entry for the nested object.
Contributor
There was a problem hiding this comment.
clientContextParams?.[configKey] ?? clientContextParams?.[canonicalEndpointParamKey];is canonicalEndpointParamKey ApiKey and configKey apiKey?
if they are different then both still need to be checked
Contributor
Author
There was a problem hiding this comment.
The clientContextParams uses a local name so wouldn't it be just clientContextParams?.[configKey] do we still need to check clientContextParams?.[canonicalEndpointParamKey]?
1ed724d to
182326a
Compare
kuhe
reviewed
Dec 5, 2025
| @@ -1,5 +1,5 @@ | |||
| // smithy-typescript generated code | |||
| import type { HttpAuthScheme } from "@smithy/types"; | |||
| import { type HttpAuthScheme, ApiKeyIdentity, ApiKeyIdentityProvider } from "@smithy/types"; | |||
7016448 to
5401b57
Compare
smilkuri
commented
Dec 10, 2025
kuhe
reviewed
Dec 10, 2025
c848d0a to
fee039f
Compare
siddsriv
reviewed
Dec 11, 2025
7f2389e to
17d3116
Compare
17d3116 to
7383a37
Compare
7383a37 to
596c0a3
Compare
kuhe
approved these changes
Dec 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
#1779
codegen v3:aws/aws-sdk-js-v3#7549
Description of changes:
This fixes TypeScript client codegen conflict between known config keys and clientContextParams by adding the nested clientContextParams object to isolate conflicting parameters while maintaining backward compatibility and proper precedence.
--