2.3.0 • Published 6 years ago

express-swagger-ui-router v2.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

express-swagger-ui-router NPM version

Cleanly serve swagger-ui and a local openapi configuration file.

Installation

npm install --save express-swagger-ui-router
# Install peer dependencies
npm install --save swagger-ui express 

Usage

This module exports a single function with a configFile parameter which takes the path to a local openapi configuration file. It returns an express.Router instance which can be mounted at any desired path.

import express from 'express';
import path from 'path';
import swaggerServer from 'express-swagger-ui-router';

const app = express();

app.use('/swagger',
  swaggerServer({ configFile: path.resolve(__dirname, 'openapi.json') }));

app.listen(3000);

// Access swagger-ui at localhost:3000/swagger
2.3.0

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.5.0

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago