diff --git a/lib/src/code_generators/swagger_models_generator.dart b/lib/src/code_generators/swagger_models_generator.dart index 29dafe98..b30603f2 100644 --- a/lib/src/code_generators/swagger_models_generator.dart +++ b/lib/src/code_generators/swagger_models_generator.dart @@ -378,7 +378,9 @@ abstract class SwaggerModelsGenerator extends SwaggerGeneratorBase { } if (parameter.items?.properties.isNotEmpty == true) { - return 'List<${getValidatedClassName(className)}\$${getValidatedClassName(parameterName)}\$Item$modelPostfix>'; + final parameterNameCombination = + '${getValidatedClassName(className)}\$${getValidatedClassName(parameterName)}\$Item$modelPostfix'; + return 'List<${getValidatedClassName(parameterNameCombination)}>'; } if (parameter.hasRef) {