initial
This commit is contained in:
17
src/swagger/builder.js
Normal file
17
src/swagger/builder.js
Normal file
@ -0,0 +1,17 @@
|
||||
const swaggerAutogen = require('swagger-autogen')();
|
||||
const config = require('config');
|
||||
|
||||
const doc = {
|
||||
info: {
|
||||
title: config.get('app.name'),
|
||||
description: config.get('app.description'),
|
||||
version: config.get('app.version')
|
||||
},
|
||||
host: config.get('server.host_swagger') + ':' + config.get('server.port'),
|
||||
};
|
||||
|
||||
const outputFile = './swagger.json';
|
||||
const routes = ['../routes/private.ts', '../routes/public.ts'];
|
||||
|
||||
swaggerAutogen(outputFile, routes, doc);
|
||||
|
||||
Reference in New Issue
Block a user