Skip to content

Commit fbd089e

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

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

+6
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 of NonAwsEndpoints 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, "NonAwsEndpoints", 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)