Skip to content

Commit b916ba8

Browse files
kstichtrivikr
authored andcommitted
Fix build and naming consistency issues (#554)
1 parent 45e8d60 commit b916ba8

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public List<RuntimeClientPlugin> getClientPlugins() {
9696
RuntimeClientPlugin.builder()
9797
.withConventions(AwsDependency.SSEC_MIDDLEWARE.dependency, "Ssec", HAS_MIDDLEWARE)
9898
.servicePredicate((m, s) -> testServiceId(s, "S3"))
99-
.operationPredicate((m, s, o) -> testContainsMember(m, o, SSEC_OPERATIONS))
99+
.operationPredicate((m, s, o) -> testInputContainsMember(m, o, SSEC_OPERATIONS))
100100
.build(),
101101
RuntimeClientPlugin.builder()
102102
.withConventions(AwsDependency.LOCATION_CONSTRAINT.dependency, "LocationConstraint",
@@ -113,7 +113,11 @@ public List<RuntimeClientPlugin> getClientPlugins() {
113113
);
114114
}
115115

116-
private static boolean testContainsMember(Model model, OperationShape operationShape, Set<String> expectedMemberNames) {
116+
private static boolean testInputContainsMember(
117+
Model model,
118+
OperationShape operationShape,
119+
Set<String> expectedMemberNames
120+
) {
117121
OperationIndex operationIndex = model.getKnowledge(OperationIndex.class);
118122
return operationIndex.getInput(operationShape)
119123
.filter(input -> input.getMemberNames().stream().anyMatch(expectedMemberNames::contains))

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
package software.amazon.smithy.aws.typescript.codegen;
1717

18+
import java.util.Set;
1819
import software.amazon.smithy.aws.traits.ServiceTrait;
1920
import software.amazon.smithy.codegen.core.SymbolProvider;
2021
import software.amazon.smithy.model.Model;
@@ -25,8 +26,6 @@
2526
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
2627
import software.amazon.smithy.utils.SetUtils;
2728

28-
import java.util.Set;
29-
3029
/**
3130
* Adds Md5Hash if needed.
3231
*/

0 commit comments

Comments
 (0)