Skip to content

Commit ca9e649

Browse files
authored
Remove redundant getStaticContextParams function (#1359)
1 parent efcbbf4 commit ca9e649

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/endpointsV2/RuleSetParameterFinder.java

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
import software.amazon.smithy.rulesengine.traits.ContextParamTrait;
3131
import software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait;
3232
import software.amazon.smithy.rulesengine.traits.StaticContextParamsTrait;
33+
import software.amazon.smithy.utils.SmithyInternalApi;
3334

35+
@SmithyInternalApi
3436
public class RuleSetParameterFinder {
3537
private final ServiceShape service;
3638
private final EndpointRuleSetTrait ruleset;
@@ -73,31 +75,6 @@ public Map<String, String> getClientContextParams() {
7375
return map;
7476
}
7577

76-
/**
77-
* "The staticContextParams trait defines one or more context parameters that MUST
78-
* be bound to the specified values. This trait MUST target an operation shape."
79-
*/
80-
public Map<String, String> getStaticContextParams(Shape operationInput) {
81-
Map<String, String> map = new HashMap<>();
82-
83-
if (operationInput.isStructureShape()) {
84-
operationInput.getAllMembers().forEach((String memberName, MemberShape member) -> {
85-
Optional<StaticContextParamsTrait> trait = member.getTrait(StaticContextParamsTrait.class);
86-
if (trait.isPresent()) {
87-
StaticContextParamsTrait staticContextParamsTrait = trait.get();
88-
staticContextParamsTrait.getParameters().forEach((name, definition) -> {
89-
map.put(
90-
name,
91-
definition.getValue().getType().toString()
92-
);
93-
});
94-
}
95-
});
96-
}
97-
98-
return map;
99-
}
100-
10178
/**
10279
* Get map of params to actual values instead of the value type.
10380
*/

0 commit comments

Comments
 (0)