Skip to content

CLI should be able to output its own version #3007

@ePaul

Description

@ePaul
Description

When getting a codegen CLI binary of unknown origin, it is currently not possible to know which version of codegen it is.

As an example, I yesterday downloaded the docker image mydock/swagger-codegen-prebuilt (from https://github.com/mydock/swagger-codegen-prebuilt, I guess) mentioned in #2991, and was unable to determine which version of swagger-codegen it is.

Swagger-codegen version

This applies to master from yesterday (2.2.0-SNAPSHOT) as well as all older versions I tested.

Suggest a Fix

There could be either an option (common are -V, --version) or a subcommand (version) which outputs the artifact version. Alternatively (or in addition) this could be included in the help command's output.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions