openapi2curl
v0.2.0
Published
Convert OpenAPI 3.0 to cURL examples
Downloads
5
Readme
openapi2curl
Convert OpenAPI 3.0 to simple cURL examples.
Installation
npm install -g openapi2curl
Usage
USAGE
$ openapi2curl
OPTIONS
-h, --help show CLI help
-i, --input=input (required) the input OpenAPI 3.X file
-o, --output=output [default: curl.md] the output file to write samples to
-v, --version show CLI version
-x, --hiddenTag Embed the operateionIDs as hidden comments in the markdown
Examples
Loading from a remote URL:
openapi2curl -i https://opensource.box.com/box-openapi/openapi.json -o README.md
Loading from a local URL:
openapi2curl -i ./openapi.json -o CURL.md
Limitations
- This project is currently mostly untested.
- It only works with OpenAPI 3.0 JSON files.
- It does not support splitting the docs into multiple files
- It still has issues with rendering binary content in the request body