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] example project fails to generate code #346

Closed
vipw opened this issue Feb 16, 2022 · 7 comments · Fixed by #351
Closed

[BUG] example project fails to generate code #346

vipw opened this issue Feb 16, 2022 · 7 comments · Fixed by #351
Assignees
Labels
bug Something isn't working Triage needed

Comments

@vipw
Copy link
Contributor

vipw commented Feb 16, 2022

Describe the bug
With a fresh checkout of this project (d272376), the example fails to generate code.

To Reproduce
cd to the example subdirectory and run:
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs

Expected behavior
Classes to be generated for the swagger petstore example.

Library version used:
d272376

Additional context
The code that's being generated has paths in the export
Output:

[SEVERE] swagger_dart_code_generator:swagger_dart_code_generator on input_folder/swagger_dart_code_generator_temp.dart (cached):

Could not format because the source could not be parsed:

line 2, column 61 of .: Expected to find ';'.
  ╷
2 │ export 'input_folder\pet_service_swagger.swagger.dart' show InputFolder\petServiceSwagger;
@vipw vipw added bug Something isn't working Triage needed labels Feb 16, 2022
@Vovanella95
Copy link
Collaborator

@vipw woah it's nice catch. could you share your swagger file name?

@vipw
Copy link
Contributor Author

vipw commented Feb 16, 2022

It's using the default swagger files from the example.

input_urls:
             - "https://raw.githubusercontent.com/epam-cross-platform-lab/swagger-dart-code-generator/master/example/input_folder/pet_service_json.json"
             - https://raw.githubusercontent.com/epam-cross-platform-lab/swagger-dart-code-generator/master/example/input_folder/pet_service_yaml.yaml

I think the files are downloaded to input_folder which the generator then uses.

@Vovanella95
Copy link
Collaborator

@vipw thanks! Swaggers from urls is pretty new feature. I will try to fix it asap

@Vovanella95
Copy link
Collaborator

@vipw Looks like problem in slashes. I am working on macOS machine. Will check it on my Windows laptop

@ByronHolt
Copy link

Experiencing issues with slashes on windows, everything above version 2.3.13 is not working.

@Vovanella95
Copy link
Collaborator

@ByronHolt yes yes, the main priority for us - to fix Windows for now

@Vovanella95
Copy link
Collaborator

Hi @ByronHolt I've fixed your issue, but lost phone and cannot sign in with two factor auth at weekend. Today evening I will push changes and close this issue. Thanks for waiting.

Vovanella95 added a commit that referenced this issue Feb 28, 2022
Vovanella95 added a commit that referenced this issue Feb 28, 2022
* Downgraded path dependency

* Updated pubspec and changelog

* Fixed enums with 'class' name generation #283

* Fixed names duplication

* Fixed case when class named 'Query' #343

* Updated pubspec and changelog

* Fixed _dateToJson generation destination when separateModels=true #347

* Fixed #350

* Updated pubspec and changelog

* Updated changelog and pubspec

* Updated changelog description

* One more update

* Fix #346

* Updated changelog

Co-authored-by: uladzimir_paliukhovich <>
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.

4 participants