Skip to content

Commit

Permalink
Fix NullPointerException on ComposedSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
NouemanKHAL committed Jun 29, 2021
1 parent 5c7e104 commit 24575fc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o
} else if (ModelUtils.isComposedSchema(schema)) {
ComposedSchema cm = (ComposedSchema) schema;
List<Schema> ls = cm.getOneOf();
if (!ls.isEmpty()) {
if (ls != null && !ls.isEmpty()) {
return fullPrefix + toExampleValue(ls.get(0)) + closeChars;
}
return fullPrefix + closeChars;
Expand Down

0 comments on commit 24575fc

Please sign in to comment.