forked from loafle/openapi-generator-original
Copy dataformat if property field is an array. (#4661)
If a type's field is an array or map, dataFormat of the innerProperty was not copied into encapsulating property. This change fixes it.
This commit is contained in:
committed by
wing328
parent
8042f5ca3e
commit
f62a7e2144
@@ -1759,6 +1759,7 @@ public class DefaultCodegen {
|
||||
LOGGER.warn("skipping invalid array property " + Json.pretty(property));
|
||||
return;
|
||||
}
|
||||
property.dataFormat = innerProperty.dataFormat;
|
||||
if (!languageSpecificPrimitives.contains(innerProperty.baseType)) {
|
||||
property.complexType = innerProperty.baseType;
|
||||
} else {
|
||||
@@ -1795,6 +1796,7 @@ public class DefaultCodegen {
|
||||
property.isPrimitiveType = true;
|
||||
}
|
||||
property.items = innerProperty;
|
||||
property.dataFormat = innerProperty.dataFormat;
|
||||
// inner item is Enum
|
||||
if (isPropertyInnerMostEnum(property)) {
|
||||
// isEnum is set to true when the type is an enum
|
||||
|
||||
Reference in New Issue
Block a user