From 6486a00d40e3a6cdc302b698a78f0f62cd896a4d Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Fri, 25 Jun 2021 16:02:26 +0000 Subject: [PATCH] Accept boolean parameters in FunctionParameterList --- .../software/amazon/smithy/typescript/codegen/CodegenUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenUtils.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenUtils.java index a30ac89929b..d332eab017f 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenUtils.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenUtils.java @@ -160,6 +160,8 @@ static List getFunctionParametersList(Map paramsMap) { } } else if (value instanceof String) { functionParametersList.add(String.format("%s: '%s'", key, value)); + } else if (value instanceof Boolean) { + functionParametersList.add(String.format("%s: %s", key, value)); } else { // Future support for param type should be added in else if. throw new CodegenException("Plugin function parameters not supported for type "