@repositive/apigen
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -9,3 +9,3 @@ { | ||
"name": "@repositive/apigen", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Generate code from OpenAPI specs", | ||
@@ -12,0 +12,0 @@ "license": "UNLICENSED", |
@@ -6,12 +6,10 @@ # Generate API definitions from OpenAPI YAML specs | ||
```bash | ||
cargo install --git ssh://git@github.com/repositive/apigen.git | ||
npm install --save-dev @repositive/apigen | ||
``` | ||
Rust is required to use this tool. Install Rust with [Rustup](https://rustup.rs/). | ||
Add the `apigen` script to your `"scripts"` section in `package.json`: | ||
You can only install apigen if you a member of the Repositive Github org. You also need to add your SSH key to ssh-agent for the `cargo install` command to work properly. | ||
```bash | ||
ssh-add -K ~/.ssh/id_rsa | ||
``` | ||
"apigen": "apigen ts -o ./src/openapi | ||
``` | ||
@@ -21,6 +19,6 @@ ## Usage | ||
```bash | ||
apigen ts ./path/to/api.yaml -o ./path/to/output/folder | ||
npm run apigen | ||
``` | ||
Output is rendered to a folder at `./path/to/output/folder/`. If the folder (or its parents) don't exist, they will be created. Any other non-target files in the folder will not be overwritten, but it's good practice to keep this folder clean, and untracked by Git. | ||
Output is rendered to a folder at the path specified in the NPM scripts command (`./src/openapi`). If the folder (or its parents) don't exist, they will be created. Any other non-target files in the folder will be kept. It's good practice to add `./src/openapi` to `.gitignore`. | ||
@@ -27,0 +25,0 @@ ## Development |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13623590
55