Closed philip closed 7 years ago
@philip thanks for the suggestion. Have you tried the following?
$ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar version
2.2.2-SNAPSHOT
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar help
shows the usage:
usage: swagger-codegen-cli <command> [<args>]
The most commonly used swagger-codegen-cli commands are:
config-help Config help for chosen lang
generate Generate code with chosen lang
help Display help information
langs Shows available langs
meta MetaGenerator. Generator for creating a new template set and configuration for Codegen. The output will be based on the language you specify, and includes default templates to include.
version Show version information
See 'swagger-codegen-cli help <command>' for more information on a specific
command.
@wing328 thanks, I missed that, but can now confirm that it exists in 2.2.2 :)
@philip np. If you've other feedbacks to make Swagger Codegen better, please share with us 😃
(we've just added Swagger Codegen to ProductHunt: https://www.producthunt.com/posts/swagger-codegen, pleae upvote if you found Swagger Codegen useful)
@wing328 Interesting, I'll check it out and do find it useful. It also works well for validating swagger files, and/or finding ways to improve them.
This thread brought up two minor help text issues where (a) the help refers to swagger-codegen-cli
when I only have swagger-codegen
(I understand why, but it's a little odd), and (b) the help text "The most commonly used swagger-codegen-cli commands are" makes me assume that other commands exist that I'm missing out on, like I'm not in the know. I can file a separate bug on this if you wish and agree :)
Description
It is difficult to determine our swagger-codegen version. Consider reporting the version number somehow, perhaps within the help output and/or by adding a version command.
Swagger-codegen version
2.2.1
Steps to reproduce
When reporting swagger-codegen bugs, I remember trying both "swagger-codegen help" and "swagger-codegen version" to determine the version number, and neither report it.
Instead, to figure it out, I ended up doing the following:
For example, today on my macOS system it shows
exec java -jar /usr/local/Cellar/swagger-codegen/2.2.1/libexec/swagger-codegen-cli.jar "$@"
so I assume2.2.1
is the version there.Suggest a Fix
Consider adding a
version
command soswagger-codegen version
outputs the version number. Additionally, consider adding the version number to theswagger-codegen help
output.That said, this is a low priority feature request.