openapi2curl

0.2.0 • Public • Published

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

/openapi2curl/

    Package Sidebar

    Install

    npm i openapi2curl

    Weekly Downloads

    1

    Version

    0.2.0

    License

    Apache-2.0

    Unpacked Size

    20.1 kB

    Total Files

    12

    Last publish

    Collaborators

    • cbetta