Skip to content

Commit

Permalink
Fixed #665 generation putIfAbsent for response from content schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Uladzimir Paliukhovich committed Nov 10, 2023
1 parent 6b9e104 commit c191faf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/code_generators/swagger_requests_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c191faf

Please sign in to comment.