https://github.com/stephane-segning/rust-open-api-cli
openapi_cli is a Rust-based command-line tool for generating code from OpenAPI specifications
https://github.com/stephane-segning/rust-open-api-cli
openapi3 reqwest rust rust-lang structopt
Last synced: 2 months ago
JSON representation
openapi_cli is a Rust-based command-line tool for generating code from OpenAPI specifications
- Host: GitHub
- URL: https://github.com/stephane-segning/rust-open-api-cli
- Owner: stephane-segning
- Created: 2023-07-22T15:19:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-22T22:07:39.000Z (almost 2 years ago)
- Last Synced: 2025-01-16T03:56:18.017Z (4 months ago)
- Topics: openapi3, reqwest, rust, rust-lang, structopt
- Language: Rust
- Homepage: https://dev.ssegning.com
- Size: 37.1 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# openapi_cli
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.
## Features
- 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## Prerequisites
- Rust programming language (You can install Rust from [here](https://rustup.rs/))
- Java Development Kit (JDK)## Installation
```bash
$ 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.
## Usage
To use the application, run the command below from the command line:
```bash
$ ./target/release/openapi_cli generate -v -i -o -l
```Replace with the version of OpenAPI generator CLI, `` 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.
## Contributing
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.
## License
[MIT](https://choosealicense.com/licenses/mit/)