You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
String.format("Expected the field `{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}` to be an array in the JSON string but got `%s`", jsonObj["{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"].toString())
292
292
}
293
293
{{/required}}
294
+
{{#items.isPrimitiveType}}
295
+
// ensure the items in json array are primitive
296
+
if (jsonObj["{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"] != null) {
297
+
for (i in 0 until jsonObj.getAsJsonArray("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}").size()) {
Copy file name to clipboardExpand all lines: samples/client/petstore/kotlin-model-prefix-type-mappings/src/main/kotlin/org/openapitools/client/models/ApiPet.kt
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,14 @@ data class ApiPet (
151
151
require(jsonObj["photoUrls"].isJsonArray()) {
152
152
String.format("Expected the field `photoUrls` to be an array in the JSON string but got `%s`", jsonObj["photoUrls"].toString())
153
153
}
154
+
// ensure the items in json array are primitive
155
+
if (jsonObj["photoUrls"] !=null) {
156
+
for (i in0 until jsonObj.getAsJsonArray("photoUrls").size()) {
0 commit comments