-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use Openapi Generator Dart with Dart 3 ? #146
Labels
bug
Something isn't working
Comments
It's not possible as https://github.com/OpenAPITools/openapi-generator generates only Dart 2 code. Both |
The only problem I faced with dart 3 was that mixins are defined as abstract classes which is not a valid code in dart 3. #!/bin/bash
MODEL_DIRECTORY="./lib/sdk/lib/src/model/"
for file in "$MODEL_DIRECTORY"/*; do
if [ -f "$file" ]; then
sed -i '' "s/abstract class _/mixin _/Ig" "$file"
echo "Moved to mixins in: $file"
fi
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug
Could not generate project with dart 3
Steps to reproduce
Using Dart SDK version: 3.3.4 (stable) (Tue Apr 16 19:56:12 2024 +0000) on "macos_arm64"
Run generate and pubspec.yaml as
Expected behavior
Openapi-Generator-Dart should generate dart 3 project with pubspec env as
Logs
No response
Screenshots
No response
Platform
macOS
Library version
5.0.2
Flutter version
3.19.6
Flutter channel
stable
Additional context
No response
The text was updated successfully, but these errors were encountered: