Skip to content
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

[BUG] "build_only_models: true" causes missing "import 'dart:convert';" #372

Closed
jl-insiders opened this issue Mar 29, 2022 · 1 comment · Fixed by #373
Closed

[BUG] "build_only_models: true" causes missing "import 'dart:convert';" #372

jl-insiders opened this issue Mar 29, 2022 · 1 comment · Fixed by #373
Assignees
Labels
bug Something isn't working Triage needed

Comments

@jl-insiders
Copy link

First I wanted to say thank you for sharing this library. Currently, we are using the models only feature which was working well up to v2.3.13.

Describe the bug
When setting "build_only_models: true" in build.yaml,
the generated file: pet_service_json.swagger.dart
is missing "import 'dart:convert';" for jsonEncode.

To Reproduce
I can reproduce this using the swagger file from the example in this repo.
Edit build.yaml and set "build_only_models" to true.
flutter pub run build_runner build --delete-conflicting-outputs
Then look in pet_service_json.swagger.dart and notice that
import 'dart:convert'; is not in the file.

Library version used:
v2.4.7

@Vovanella95
Copy link
Collaborator

Hi @jl-insiders will take a look into it asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Triage needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants