@@ -762,6 +762,10 @@ private String setUniquePropertyName(CodegenModel model, CodegenProperty propert
762762 return value ;
763763 }
764764
765+ /**
766+ * Fixes nested maps so the generic type is defined
767+ * Convertes List<List>> to List<List<T>>
768+ */
765769 private String patchPropertyName (CodegenModel model , CodegenProperty property , String value , Set <String > composedPropertyNames ) {
766770 value = setUniquePropertyName (model , property , value );
767771
@@ -857,37 +861,6 @@ protected void patchProperty(Map<String, CodegenModel> enumRefs, CodegenModel mo
857861 }
858862 }
859863
860- private void patchNestedMaps (CodegenProperty property ) {
861- // Process nested types before making any replacements to ensure we have the correct inner type
862- if (property .items != null ) {
863- patchNestedMaps (property .items );
864- }
865-
866- String [] nestedTypes = {"List" , "Collection" , "ICollection" , "Dictionary" };
867-
868- if (property .datatypeWithEnum != null ) {
869- String originalType = property .datatypeWithEnum ;
870-
871- for (String nestedType : nestedTypes ) {
872- // fix incorrect data types for maps of maps
873- if (property .items != null ) {
874- if (property .datatypeWithEnum .contains (", " + nestedType + ">" )) {
875- property .datatypeWithEnum = property .datatypeWithEnum .replace (", " + nestedType + ">" , ", " + property .items .datatypeWithEnum + ">" );
876- }
877-
878- if (property .datatypeWithEnum .contains ("<" + nestedType + ">" )) {
879- property .datatypeWithEnum = property .datatypeWithEnum .replace ("<" + nestedType + ">" , "<" + property .items .datatypeWithEnum + ">" );
880- }
881- }
882- }
883-
884- // Only update dataType if we actually made changes
885- if (!originalType .equals (property .datatypeWithEnum )) {
886- property .dataType = property .datatypeWithEnum ;
887- }
888- }
889- }
890-
891864 @ Override
892865 protected List <Map <String , Object >> buildEnumVars (List <Object > values , String dataType ) {
893866 List <Map <String , Object >> enumVars = super .buildEnumVars (values , dataType );
0 commit comments