From 11f9e700581aff7eefc7fffd00328b940187a99e Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Mon, 16 Dec 2024 08:47:14 -0800 Subject: [PATCH] chore: put both key and value in quotes Co-authored-by: George Fu --- .../amazon/smithy/typescript/codegen/CodegenUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 df53e49fada..df76791c97f 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 @@ -312,7 +312,9 @@ static List getFunctionParametersList(Map paramsMap) { throw new CodegenException("Plugin function parameters map must be Map"); } List valueStringList = valueMap.entrySet().stream() - .map(entry -> String.format("%s: \"%s\"", entry.getKey(), entry.getValue())) + .map(entry -> String.format(""" + "%s": "%s" + """, entry.getKey(), entry.getValue())) .collect(Collectors.toList()); functionParametersList.add(String.format("%s: {%s}", key, valueStringList.stream().collect(Collectors.joining(", "))));