mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 05:32:46 +00:00
@@ -415,8 +415,10 @@ public class Pet {
|
||||
if (!jsonObj.get("name").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
|
||||
}
|
||||
// ensure the json data is an array
|
||||
if ((jsonObj.get("photoUrls") != null && !jsonObj.get("photoUrls").isJsonNull()) && !jsonObj.get("photoUrls").isJsonArray()) {
|
||||
// ensure the required json array is present
|
||||
if (jsonObj.get("photoUrls") == null) {
|
||||
throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`");
|
||||
} else if (!jsonObj.get("photoUrls").isJsonArray()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `photoUrls` to be an array in the JSON string but got `%s`", jsonObj.get("photoUrls").toString()));
|
||||
}
|
||||
if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) {
|
||||
|
||||
Reference in New Issue
Block a user