@@ -2934,8 +2934,7 @@ public CodegenModel fromModel(String name, Schema schema) {
2934
2934
m .setFormat (schema .getFormat ());
2935
2935
m .setComposedSchemas (getComposedSchemas (schema ));
2936
2936
if (ModelUtils .isArraySchema (schema )) {
2937
- String itemName = getItemsName (null , name );
2938
- CodegenProperty arrayProperty = fromProperty (itemName , schema , false );
2937
+ CodegenProperty arrayProperty = fromProperty (name , schema , false );
2939
2938
m .setItems (arrayProperty .items );
2940
2939
m .arrayModelType = arrayProperty .complexType ;
2941
2940
addParentContainer (m , name , schema );
@@ -7910,16 +7909,10 @@ public List<VendorExtension> getSupportedVendorExtensions() {
7910
7909
protected String handleSpecialCharacters (String name ) { return name ; }
7911
7910
7912
7911
public String getItemsName (Schema containingSchema , String containingSchemaName ) {
7913
- String itemName = null ;
7914
- if (containingSchema != null ) {
7915
- // fromProperty use case
7916
- if (containingSchema .getExtensions () != null && containingSchema .getExtensions ().get ("x-item-name" ) != null ) {
7917
- return containingSchema .getExtensions ().get ("x-item-name" ).toString ();
7918
- }
7919
- return toVarName (containingSchemaName );
7912
+ if (containingSchema .getExtensions () != null && containingSchema .getExtensions ().get ("x-item-name" ) != null ) {
7913
+ return containingSchema .getExtensions ().get ("x-item-name" ).toString ();
7920
7914
}
7921
- // fromModel use case
7922
- return containingSchemaName ;
7915
+ return toVarName (containingSchemaName );
7923
7916
}
7924
7917
7925
7918
public String getAdditionalPropertiesName () {
0 commit comments