Skip to content

Commit 637e8e9

Browse files
committed
fix type of json string
1 parent 9c52be0 commit 637e8e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+182
-182
lines changed

modules/openapi-generator/src/main/resources/r/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@
456456
local_var_body <- `{{paramName}}`$toJSONString()
457457
{{/isArray}}
458458
} else {
459-
body <- NULL
459+
local_var_body <- NULL
460460
}
461461
462462
{{/bodyParams}}

modules/openapi-generator/src/main/resources/r/modelGeneric.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@
334334
335335
json_string <- jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA, ...)
336336
if (minify) {
337-
return(jsonlite::minify(json_string))
337+
json_string <- jsonlite::minify(json_string)
338338
}
339-
return(json_string)
339+
return(as.character(json_string))
340340
},
341341

342342
#' @description

samples/client/echo_api/r/R/bird.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ Bird <- R6::R6Class(
9999

100100
json_string <- jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA, ...)
101101
if (minify) {
102-
return(jsonlite::minify(json_string))
102+
json_string <- jsonlite::minify(json_string)
103103
}
104-
return(json_string)
104+
return(as.character(json_string))
105105
},
106106

107107
#' @description

samples/client/echo_api/r/R/body_api.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ BodyApi <- R6::R6Class(
304304
if (!is.null(`body`)) {
305305
local_var_body <- `body`$toJSONString()
306306
} else {
307-
body <- NULL
307+
local_var_body <- NULL
308308
}
309309

310310
local_var_url_path <- "/body/application/octetstream/binary"
@@ -586,7 +586,7 @@ BodyApi <- R6::R6Class(
586586
if (!is.null(`pet`)) {
587587
local_var_body <- `pet`$toJSONString()
588588
} else {
589-
body <- NULL
589+
local_var_body <- NULL
590590
}
591591

592592
local_var_url_path <- "/echo/body/allOf/Pet"
@@ -682,7 +682,7 @@ BodyApi <- R6::R6Class(
682682
if (!is.null(`body`)) {
683683
local_var_body <- `body`$toJSONString()
684684
} else {
685-
body <- NULL
685+
local_var_body <- NULL
686686
}
687687

688688
local_var_url_path <- "/echo/body/FreeFormObject/response_string"
@@ -778,7 +778,7 @@ BodyApi <- R6::R6Class(
778778
if (!is.null(`pet`)) {
779779
local_var_body <- `pet`$toJSONString()
780780
} else {
781-
body <- NULL
781+
local_var_body <- NULL
782782
}
783783

784784
local_var_url_path <- "/echo/body/Pet"
@@ -874,7 +874,7 @@ BodyApi <- R6::R6Class(
874874
if (!is.null(`pet`)) {
875875
local_var_body <- `pet`$toJSONString()
876876
} else {
877-
body <- NULL
877+
local_var_body <- NULL
878878
}
879879

880880
local_var_url_path <- "/echo/body/Pet/response_string"
@@ -970,7 +970,7 @@ BodyApi <- R6::R6Class(
970970
if (!is.null(`body`)) {
971971
local_var_body <- `body`$toJSONString()
972972
} else {
973-
body <- NULL
973+
local_var_body <- NULL
974974
}
975975

976976
local_var_url_path <- "/echo/body/string_enum"
@@ -1066,7 +1066,7 @@ BodyApi <- R6::R6Class(
10661066
if (!is.null(`tag`)) {
10671067
local_var_body <- `tag`$toJSONString()
10681068
} else {
1069-
body <- NULL
1069+
local_var_body <- NULL
10701070
}
10711071

10721072
local_var_url_path <- "/echo/body/Tag/response_string"

samples/client/echo_api/r/R/category.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ Category <- R6::R6Class(
9999

100100
json_string <- jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA, ...)
101101
if (minify) {
102-
return(jsonlite::minify(json_string))
102+
json_string <- jsonlite::minify(json_string)
103103
}
104-
return(json_string)
104+
return(as.character(json_string))
105105
},
106106

107107
#' @description

samples/client/echo_api/r/R/data_query.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ DataQuery <- R6::R6Class(
147147

148148
json_string <- jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA, ...)
149149
if (minify) {
150-
return(jsonlite::minify(json_string))
150+
json_string <- jsonlite::minify(json_string)
151151
}
152-
return(json_string)
152+
return(as.character(json_string))
153153
},
154154

155155
#' @description

samples/client/echo_api/r/R/default_value.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ DefaultValue <- R6::R6Class(
188188

189189
json_string <- jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA, ...)
190190
if (minify) {
191-
return(jsonlite::minify(json_string))
191+
json_string <- jsonlite::minify(json_string)
192192
}
193-
return(json_string)
193+
return(as.character(json_string))
194194
},
195195

196196
#' @description

samples/client/echo_api/r/R/number_properties_only.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ NumberPropertiesOnly <- R6::R6Class(
112112

113113
json_string <- jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA, ...)
114114
if (minify) {
115-
return(jsonlite::minify(json_string))
115+
json_string <- jsonlite::minify(json_string)
116116
}
117-
return(json_string)
117+
return(as.character(json_string))
118118
},
119119

120120
#' @description

samples/client/echo_api/r/R/pet.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ Pet <- R6::R6Class(
167167

168168
json_string <- jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA, ...)
169169
if (minify) {
170-
return(jsonlite::minify(json_string))
170+
json_string <- jsonlite::minify(json_string)
171171
}
172-
return(json_string)
172+
return(as.character(json_string))
173173
},
174174

175175
#' @description

samples/client/echo_api/r/R/query.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ Query <- R6::R6Class(
9898

9999
json_string <- jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA, ...)
100100
if (minify) {
101-
return(jsonlite::minify(json_string))
101+
json_string <- jsonlite::minify(json_string)
102102
}
103-
return(json_string)
103+
return(as.character(json_string))
104104
},
105105

106106
#' @description

0 commit comments

Comments
 (0)