rapidoc pdf
npm install -D rapipdfnpx rapidoc pdf openapi.yamlnpx rapidoc pdf openapi.yaml -o dist/reference.pdf --title "Orders API" --examplesrapidoc pdf writes the API reference of a spec as a PDF: a cover page, a table of contents, the security schemes, and every operation with its parameters, request bodies and responses. The spec can be a file or a URL, OpenAPI 3.x or Swagger 2.0, and $refs to other files are followed. Without -o the file is named after the spec (openapi.pdf) and written to the current folder.
--schema-style tableprints schemas as tables instead of indented object trees,--examplesadds request and response examples, and--api-listadds a closing list of every operation.--no-info,--no-toc,--no-securityand--no-api-detailsleave a section out, and--no-sort-tagskeeps the tags in the spec’s order.--title,--footer,--primary-colorand--alternate-colorset the cover title, the page footer and the two colors.--labels labels.jsonreplaces the labels printed in the PDF (“REQUEST”, “RESPONSE”, …), for a PDF in another language.--font file.ttfuses your font in place of the built-in Roboto. Use it for text Roboto has no glyphs for, such as Chinese, Japanese or Korean (--mono-fontdoes the same for code).
The command needs the rapipdf package next to the CLI, the same package whose <rapi-pdf> element makes this PDF in the browser.