Skip to content

Commit 9b040c6

Browse files
committed
feat(codegen): Use separate CustomEndpointsConfig for non-AWS clients
This depends on newly added CustomEndpointsConfig in @aws-sdk/config-resolver package.
1 parent 72880e4 commit 9b040c6

File tree

1 file changed

+6
-0
lines changed
  • codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen

1 file changed

+6
-0
lines changed

codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPlugins.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,14 @@ public List<RuntimeClientPlugin> getClientPlugins() {
4747
.withConventions(TypeScriptDependency.CONFIG_RESOLVER.dependency, "Region", HAS_CONFIG)
4848
.servicePredicate((m, s) -> isAwsService(s))
4949
.build(),
50+
// Only one of Endpoints or CustomEndpoints should be used
5051
RuntimeClientPlugin.builder()
5152
.withConventions(TypeScriptDependency.CONFIG_RESOLVER.dependency, "Endpoints", HAS_CONFIG)
53+
.servicePredicate((m, s) -> isAwsService(s))
54+
.build(),
55+
RuntimeClientPlugin.builder()
56+
.withConventions(TypeScriptDependency.CONFIG_RESOLVER.dependency, "CustomEndpoints", HAS_CONFIG)
57+
.servicePredicate((m, s) -> !isAwsService(s))
5258
.build(),
5359
RuntimeClientPlugin.builder()
5460
.withConventions(TypeScriptDependency.MIDDLEWARE_RETRY.dependency, "Retry")

0 commit comments

Comments
 (0)