Class to generate PDF from OpenAPI definition.

Hierarchy

  • DocGeneratorPDF

Constructors

Properties

_options: IRavageOptions
_pdfDoc: PDFDoc

Accessors

Methods

  • Method to build pdf from OpenAPI definition and returns promise with PDFKit.PDFDocument inside

    Parameters

    • api: string | Document<{}>

      An OpenAPI definition, or the file path or URL of an OpenAPI definition. The path can be absolute or relative. In Node, the path is relative to process.cwd(). In the browser, it's relative to the URL of the page.

    Returns Promise<PDFDoc>

  • Method to create and write

    Parameters

    • api: string | Document<{}>
    • file: string

    Returns Promise<void>

  • Method to write the PDFKit.PDFDocument to *.pdf file

    Parameters

    • pdfDocument: PDFDoc
    • file: string

      The file path to write the PDF

    Returns Promise<void>

Generated using TypeDoc