Closed RoarGronmo closed 22 hours ago
@Vovanella95 gentle reminder that this will block folks like us that want to use the latest version of Chopper while using this library. Thanks in advance.
error: the argument type iterable dynamic' can't be assigned to the parameter type list interceptor in swagger_json.swagger.dart.
@fryette Can you take a look at this issue ?
@Vovanella95 looks like you're currently active today according to your Github activity. Just another gentle reminder regarding this issue. Thanks.
The line in question is the following: https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/blob/9533c64536a018f5da9217ea838fbc43a5e83a8b/lib/src/code_generators/swagger_requests_generator.dart#L121
Iterable<dynamic>?
Needs to be changed to
List<Interceptor>?
I have a local build with this change that fixes it. lmk if I can provide any more help.
@diegotori you can change your autogenerated code for now to use List<Interceptor>? interceptors
instead of Iterable<dynamic>? interceptors
at the class defenition that extends ChopperService
in you name.swagger.dart
file.
That should get you unblocked.
@fryette @Vovanella95 Can either of you take a look at the PR?
Are @fryette and @Vovanella95 still alive ?
Are @fryette and @Vovanella95 still alive ?
Based on @Vovanella95's activity, looks like he is, since he's been opening PRs in another project.
Perhaps he's getting slammed with other pressing matters.
@Vovanella95 ball is in your court.
@af-chacon Do you have a "setup" on how we can use your fork with your fix PR of this repository (I am not to familiar with how .yaml works) in our projects, until @fryette or @Vovanella95 wakes up ?
@af-chacon Do you have a "setup" on how we can use your fork with your fix PR of this repository (I am not to familiar with how .yaml works) in our projects, until @fryette or @Vovanella95 wakes up ?
Found a solution for this one:
In pubspec.yaml
:
Replace current dependency: swagger_dart_code_generator: ^2.15.2
with:
swagger_dart_code_generator:
git:
url: https://github.com/epam-cross-platform-lab/swagger-dart-code-generator.git
ref: bacb7781f94e44cb217f163aee8cb681b40d55af
flutter pub upgrade --major-versions
flutter pub get
(just for the case of it)dart run build_runner build --delete-conflicting-outputs
I hope @fryette and @Vovanella95 is still alive, but I fear this dependency to die soon if no one maintains it anymore, it has lowered its score to 120 now... ...I may look for a replacement if we don't hear from them in 2-3 months.
We need a fix asap (update to the latest chopper version). It's a real struggle to update tens of swagger files because this issue.
We need a fix asap (update to the latest chopper version). It's a real struggle to update tens of swagger files because this issue.
Have you tried the intermediate solution above, until @Vovanella95 or @fryette responds ?
You can use the following until a new version is released.
swagger_dart_code_generator:
git:
url: https://github.com/af-chacon/swagger-dart-code-generator
ref: user/aedis/fix-chopper-8-iterceptor-generation
Any updates on this, guys? @Vovanella95 @fryette ? Is there a chance you give merge/publish permissions for anyone else?
Should be fine in next release
Describe the bug Generated code is failing on
interceptors
because of breaking changes in chopper v8.0.0To Reproduce
Expected behavior Flawless code generation
Swagger specification link Links to breaking change in chopper: https://pub.dev/packages/chopper/changelog https://github.com/lejard-h/chopper/pull/547
Library version used:
swagger_dart_code_generator: ^2.15.2
Additional context Seems still valid if chopper v.7.4.x is used