diff --git a/modules/swagger-codegen/src/main/resources/r/api.mustache b/modules/swagger-codegen/src/main/resources/r/api.mustache index eb64e29cdb2..c2f9f75fbea 100644 --- a/modules/swagger-codegen/src/main/resources/r/api.mustache +++ b/modules/swagger-codegen/src/main/resources/r/api.mustache @@ -67,7 +67,7 @@ {{#hasBodyParam}} {{#bodyParams}} if (!missing(`{{paramName}}`)) { - body <- `{{paramName}}`$toJSON() + body <- `{{paramName}}`$toJSONString() } {{/bodyParams}} {{/hasBodyParam}} diff --git a/modules/swagger-codegen/src/main/resources/r/model.mustache b/modules/swagger-codegen/src/main/resources/r/model.mustache index 9181c8e51e2..94ae74085e2 100644 --- a/modules/swagger-codegen/src/main/resources/r/model.mustache +++ b/modules/swagger-codegen/src/main/resources/r/model.mustache @@ -98,7 +98,7 @@ sprintf( '{ {{#vars}} - "{{baseName}}": {{#isListContainer}}[{{/isListContainer}}{{#isPrimitiveType}}{{#isNumeric}}%d{{/isNumeric}}{{^isNumeric}}"%s"{{/isNumeric}}{{/isPrimitiveType}}{{^isPrimitiveType}}%s{{/isPrimitiveType}}{{#isListContainer}}]{{/isListContainer}}{{#hasMore}},{{/hasMore}} + "{{baseName}}": {{#isListContainer}}[{{/isListContainer}}{{#isPrimitiveType}}{{#isNumeric}}%d{{/isNumeric}}{{^isNumeric}}%s{{/isNumeric}}{{/isPrimitiveType}}{{^isPrimitiveType}}%s{{/isPrimitiveType}}{{#isListContainer}}]{{/isListContainer}}{{#hasMore}},{{/hasMore}} {{/vars}} }', {{#vars}}