Package detail

exegesis-plugin-swagger-ui-express

phil-mitchell1.5kMIT1.0.10

Swagger UI as an exegesis plugin

readme

exegesis-plugin-swagger-ui-express

Run Status Coverage Badge

Description

Adds exegesis support for the Swagger UI using Express.

Installation

npm install exegesis-plugin-swagger-ui-express

Example

Add this to your Exegesis options:

const exegesisSwaggerUIPlugin = require( 'exegesis-plugin-swagger-ui-express' );

options = {
    plugins: [
        exegesisSwaggerUIPlugin({
            // Express app (required)
            app: app,

            // URL path to expose API docs (default /)
            path: '/api-docs',

            // Options to pass to Swagger UI
            swaggerUIOptions: {
                explorer: true
            }

        })
    ]
};