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
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