Swagger UI Frontend middleware
npm i @nanoexpress/middleware-swagger-ui
# or
yarn add @nanoexpress/middleware-swagger-ui
See the examples directory
import swaggerUi from '@nanoexpress/middleware-swagger-ui';
app.define(swagger); // For nanoexpress this line doesn't need
app.use('/swagger-ui-dist', swaggerUi());
const swaggerUi = require('@nanoexpress/middleware-swagger-ui/cjs');
app.define(swagger); // For nanoexpress this line doesn't need
app.use('/swagger-ui-dist', swaggerUi());
Options name | Default | Required | Description |
---|---|---|---|
options.title |
nanoexpress - ReDoc | No | Title of documentation page |
options.path |
/docs/ |
No | Path of documentation page |
options.url |
- | No | URL of Swagger file |
MIT