Skip to content

Commit

Permalink
Read staticContextParams from operation
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Dec 14, 2022
1 parent 2132bdd commit 02604ec
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -194,19 +194,21 @@ private void generateEndpointParameterInstructionProvider() {
RuleSetParameterFinder parameterFinder = new RuleSetParameterFinder(service);
Set<String> paramNames = new HashSet<>();

Shape operationInput = model.getShape(operation.getInputShape()).get();
parameterFinder.getStaticContextParamValues(operationInput).forEach((name, value) -> {
parameterFinder.getStaticContextParamValues(operation).forEach((name, value) -> {
writer.write(
"$L: { type: \"staticContextParams\", value: $L },",
name, value
);
});

Shape operationInput = model.getShape(operation.getInputShape()).get();
parameterFinder.getContextParams(operationInput).forEach((name, type) -> {
writer.write(
"$L: { type: \"contextParams\", name: \"$L\" },",
name, name
);
});

parameterFinder.getClientContextParams().forEach((name, type) -> {
if (!paramNames.contains(name)) {
writer.write(
Expand All @@ -216,6 +218,7 @@ private void generateEndpointParameterInstructionProvider() {
}
paramNames.add(name);
});

parameterFinder.getBuiltInParams().forEach((name, type) -> {
if (!paramNames.contains(name)) {
writer.write(
Expand Down

0 comments on commit 02604ec

Please sign in to comment.