From c27da984d198d27cb8080d22ffc182ff74307a15 Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Wed, 5 Feb 2020 12:01:18 +0900 Subject: [PATCH] [kotlin] Fix non-compilable code (#5205) * The "name" field has to be a string * Avoid duplicate double quotes --- .../src/main/resources/kotlin-client/data_class.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache index fc43540f4e47..aff77693c950 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache @@ -60,7 +60,7 @@ import java.io.Serializable {{#enumVars}} {{^multiplatform}} {{#moshi}} - @Json(name = {{{value}}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} + @Json(name = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/moshi}} {{#gson}} @SerializedName(value={{{value}}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}