openapi_cli is a Rust-based command-line tool for generating code from OpenAPI specifications. It provides a simple way to download the OpenAPI generator and then generate code in a specified language.
- Downloads the OpenAPI generator CLI if it's not already present
- Generates code in a specified language from an OpenAPI specification file
- Provides a command-line interface for easy usage
- Rust programming language (You can install Rust from here)
- Java Development Kit (JDK)
$ git clone https://github.com/stephane-segning/rust-open-api-cli.git
$ cd rust-open-api-cli
$ cargo build --release
The executable will be located in the target/release directory.
To use the application, run the command below from the command line:
$ ./target/release/openapi_cli generate -v <version> -i <input> -o <output> -l <language>
Replace with the version of OpenAPI generator CLI, <input>
with the path to your OpenAPI specification file, with the path to the directory where the generated code should be saved, and with the target language for the generated code.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.