gibahjoe / openapi-generator-dart

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

Problems with the CLI command: console closes with no output #32

Closed mattia-venturini closed 3 years ago

mattia-venturini commented 3 years ago

I wanted to use openapi_generator_cli (version 2.0.0), so I followed the instructions given on the README.

On Windows, after activating the package using pub global activate openapi_generator_cli, the execution of the command openapi-generator in the console have some problems: the console closes immadiately without any output. Do you know why?

Another question: why don't you allow to use the command with pub run? It would need to rename the lib/main.dart file into _openapi_generatorcli.dart, so that one could run pub run openapi_generator_cli <command> (I tried it out and seemed to work correctly).

gibahjoe commented 3 years ago

Hi, thank you for bringing this to my attention. I will take a look at it.

gibahjoe commented 3 years ago

Hello @mattia-venturini

You need to add the directory of your pub cache flutter/.pub-cache/bin to your path and then the command will run just fine.

Another question: why don't you allow to use the command with pub run? It would need to rename the lib/main.dart file into openapi_generator_cli.dart, so that one could run pub run openapi_generator_cli (I tried it out and seemed to work correctly).

If you have already done this, a PR is most welcome.

gibahjoe commented 3 years ago

Closing because no clear next steps