openapi2curl

v0.1.0
Convert OpenAPI 3.0 to cURL examples
oclif

openapi2curl

Convert OpenAPI 3.0 to simple cURL examples.

oclif Version Downloads/week License

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

Metadata

  • Apache-2.0
  • >=8.3.0
  • Cristiano Betta @cbetta
  • released 8/6/2019

Downloads

Maintainers