gibahjoe / openapi-generator-dart

Openapi Generator for Dart/Flutter
BSD 3-Clause "New" or "Revised" License
128 stars 34 forks source link

Build_runner generates no code for dart #54

Closed wibtu closed 3 years ago

wibtu commented 3 years ago

Hey everybody,

I'm using AndroidStudio Arctic Fox and trying to use this plugin to generate a openapi-sdk for dart 2.13.4 and tried differents approaches in my project, even the petstore example from openapi-generator, but after executing

flutter clean flutter pub get flutter packages pub run build_runner build --delete-conflicting-outputs

I only get [INFO] Succeeded after 54ms with 0 outputs (0 actions) without any outputs and the output folder is empty. What am I missing?

This is the pubspec.yaml in the example project: `dependencies: flutter: sdk: flutter openapi_generator_annotations: ^2.2.0 cupertino_icons: ^1.0.2

dev_dependencies: build_runner: 1.10.3 flutter_test: sdk: flutter openapi_generator: ^2.2.0`

gibahjoe commented 3 years ago

Hello, please update to the latest version.

Also, can you post your annotated class? See read me for more details

gibahjoe commented 3 years ago

Closing this. Feel free to reopen

torbenkeller commented 2 years ago

I had the same problem. This solved it for me:

dependency_overrides:
  analyzer: 2.8.0

Now it rebuilds at least if I make a change in the file with the annotation