Skip to content

Commit

Permalink
feat(codegen): specify endpoint param names to be omitted from genera…
Browse files Browse the repository at this point in the history
…tion in the client interface (#6035)

* feat(codegen): specify endpoint param names to be omitted from generation in the client interface

* chore(codegen): add license

* chore(codegen): refactor to eliminate new set creation

* chore(codegen): checkstyle fixes
  • Loading branch information
siddsriv authored Jul 24, 2024
1 parent 83cd253 commit a673c81
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

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

import software.amazon.smithy.typescript.codegen.TypeScriptCodegenContext;
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.typescript.codegen.endpointsV2.OmitEndpointParams;
import software.amazon.smithy.utils.SetUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

@SmithyInternalApi
public class AddOmittedEndpointParams implements TypeScriptIntegration {

@Override
public void customize(TypeScriptCodegenContext codegenContext) {
setParamForOmission();
}

private void setParamForOmission() {
OmitEndpointParams.addOmittedParams(SetUtils.of("AccountId"));
}
}

0 comments on commit a673c81

Please sign in to comment.