From c191faf30158172f37694c5efb363dde40591460 Mon Sep 17 00:00:00 2001 From: Uladzimir Paliukhovich Date: Fri, 10 Nov 2023 15:16:29 +0300 Subject: [PATCH] Fixed #665 generation putIfAbsent for response from content schema --- lib/src/code_generators/swagger_requests_generator.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/code_generators/swagger_requests_generator.dart b/lib/src/code_generators/swagger_requests_generator.dart index 217605ff..f462868a 100644 --- a/lib/src/code_generators/swagger_requests_generator.dart +++ b/lib/src/code_generators/swagger_requests_generator.dart @@ -340,6 +340,9 @@ class SwaggerRequestsGenerator extends SwaggerGeneratorBase { } } else if (successResponse?.schema?.properties.isNotEmpty == true) { results.add(response); + } else if (successResponse?.content?.schema?.properties.isNotEmpty == + true) { + results.add(response); } return results.where((element) => _isValidModelName(element)).toList();