Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ private Object resolvePropertyToExample(String propertyName, String mediaType, P
Property innerType = ((ArrayProperty) property).getItems();
if (innerType != null) {
int arrayLength = null == ((ArrayProperty) property).getMaxItems() ? 2 : ((ArrayProperty) property).getMaxItems();
// max 10 examples to avoid OOM
if (arrayLength > 10) {
logger.warn("value of maxItems of property {} is {}; limiting to 10 examples", property, arrayLength);
arrayLength = 10;
}
Object[] objectProperties = new Object[arrayLength];
Object objProperty = resolvePropertyToExample(propertyName, mediaType, innerType, processedModels);
for(int i=0; i < arrayLength; i++) {
Expand Down