0.1.0 • Published 3 years ago

@new_star/rapipdf-cli v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Unofficial CLI for RapiPDF

Version Downloads/week License

This project is an adaption of RapiPDF providing a CLI for generating PDFs based on OpenAPI specs. Apart from just providing an CLI, some additional configuration options (e.g. adding a logo) are provided.

Usage

$ npm install -g @new_openapi/rapipdf-cli
$ rapipdf (-v|--version|version)
@new_openapi/rapipdf-cli/0.0.3 linux-x64 node-v14.15.1
$ rapipdf --help [COMMAND]
USAGE
  $ rapipdf SpecFile # can be either the path to a local file or a remote url (both .yaml and .json are supported)

OPTIONS

  -c, --configFile=configFile # pass the path to the configuration file (optional, see below)
  -o, --outputFile=outputFile # pass the path to the output file (defaults to "api.pdf")

Configuration File

You can pass a configuration file to the CLI (using the -c parameter) overriding the defaults. An example is provided in this repository (rapipdf.config.example-de.json).

Example Usage

Calling

$ rapipdf -o petstore.json.pdf -c config.json  petstore.json

in the examples/ folder results in the uploaded petstore.json.pdf.