Skip to content

Commit b2ce2b8

Browse files
trivikrsrchase
authored andcommitted
Accept boolean parameters in FunctionParameterList (smithy-lang#371)
1 parent b92e91e commit b2ce2b8

File tree

1 file changed

+2
-0
lines changed
  • smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen

1 file changed

+2
-0
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ static List<String> getFunctionParametersList(Map<String, Object> paramsMap) {
155155
}
156156
} else if (value instanceof String) {
157157
functionParametersList.add(String.format("%s: '%s'", key, value));
158+
} else if (value instanceof Boolean) {
159+
functionParametersList.add(String.format("%s: %s", key, value));
158160
} else {
159161
// Future support for param type should be added in else if.
160162
throw new CodegenException("Plugin function parameters not supported for type "

0 commit comments

Comments
 (0)