Skip to content

Commit

Permalink
Version/2.8.8 (#510)
Browse files Browse the repository at this point in the history
* Fixed generation of requestBodies in some border cases
Fix #489

* Updated changelog and pubspec

* Added 'Method' to key classes #492
Fixed generatino of list request bodies #493

* Fixed #491

* Fixed ticket number

* Fixed generation of basic types refs and lists of them #502

* Fixed #507
Fixed generation of allOf properties with just properties

* Updated changelog

* Fixed issue with generation Lists models map

Co-authored-by: Uladzimir Paliukhovich <[email protected]>
  • Loading branch information
Vovanella95 and Uladzimir Paliukhovich authored Dec 2, 2022
1 parent d65a7f9 commit 4ed06d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.8.8

* Fixed generation of some List models

# 2.8.7

* Fixed generation `allOf` properties with just properties ([#507](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/507))
Expand Down
8 changes: 4 additions & 4 deletions lib/src/code_generators/swagger_requests_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ class SwaggerRequestsGenerator extends SwaggerGeneratorBase {
final itemType = getValidatedClassName(ref.getUnformattedRef());
results.add(itemType);
} else {
final itemsType = schema?.items?.type;
final itemsType = schema?.items?.type ?? '';

if (!kBasicTypes.contains(itemsType) &&
schema?.items?.properties != null) {
final itemClassName = '$response\$Item';
if (!kBasicTypes.contains(itemsType) && itemsType != 'object' &&
schema?.items?.properties != null && !itemsType.startsWith('List<')) {
final itemClassName = '$itemsType\$Item';

results.add(itemClassName);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: swagger_dart_code_generator

version: 2.8.7
version: 2.8.8

homepage: https://github.com/epam-cross-platform-lab/swagger-dart-code-generator
repository: https://github.com/epam-cross-platform-lab/swagger-dart-code-generator
Expand Down

0 comments on commit 4ed06d7

Please sign in to comment.