initial
This commit is contained in:
14
src/helpers/express/swagger.ts
Normal file
14
src/helpers/express/swagger.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import config from 'config';
|
||||
import express from 'express';
|
||||
import swaggerUi from 'swagger-ui-express';
|
||||
import swaggerDocument from '../../swagger/swagger.json';
|
||||
|
||||
export class SwaggerHelper {
|
||||
static setup(app: express.Application) {
|
||||
var options = {
|
||||
explorer: false
|
||||
};
|
||||
|
||||
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument, options));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user