Skip to content

Commit

Permalink
Version/2.11.6 (#654)
Browse files Browse the repository at this point in the history
* Fixed some issues

* formatted code

* updated SDK

* Updated SDK and version

* Fixed generation of lists of classes

* Fixed generation $Items classes

* Updated pubspec and changelog

* Fixed #524

* Fixed #598 Generation of query enum parameters

* Fixed conflicts

* Fixed some issues in swaggers

* Updated changelog and pubspec

* Fix #583, #637, #619 and update readme (#638)

* fix #583 and update readme

* fix #637

* fix #619

* Fixed generation of some fields

* Removed test

* Fixed classes named List

* Fixed generation of query parameters with ref default type

---------

Co-authored-by: Uladzimir Paliukhovich <[email protected]>
Co-authored-by: Romain <[email protected]>
  • Loading branch information
3 people authored Sep 22, 2023
1 parent aaf6a71 commit c9f6ec9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/src/code_generators/swagger_requests_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,17 @@ class SwaggerRequestsGenerator extends SwaggerGeneratorBase {
if (parameter.schema!.items != null || parameter.schema!.type == kArray) {
return (parameter.schema!.ref.getRef() + modelPostfix).asList();
}

final ref = parameter.schema?.ref;

if (ref != null) {
final neededSchema = root.allSchemas[ref.getUnformattedRef()];

if (kBasicTypesMap.containsKey(neededSchema?.type)) {
return kBasicTypesMap[neededSchema?.type]!;
}
}

return (parameter.schema!.ref.getRef() + modelPostfix);
} else if (parameter.schema?.type == kArray &&
parameter.schema?.items?.type.isNotEmpty == true) {
Expand Down

0 comments on commit c9f6ec9

Please sign in to comment.