30 lines
688 B
JavaScript
30 lines
688 B
JavaScript
const swaggerJsDoc = require('swagger-jsdoc');
|
|
const swaggerUi = require('swagger-ui-express');
|
|
|
|
const swaggerOptions = {
|
|
swaggerDefinition: {
|
|
info: {
|
|
title: 'API - ManageMate',
|
|
version: '1.0-beta.1',
|
|
description: 'This documentation describes the ManageMate API.',
|
|
},
|
|
servers: [{ url: 'http://localhost:' + (process.env.PORT || 35665) }],
|
|
basePath: '/api/v1/',
|
|
},
|
|
apis: ['./routes/Dpanel/Api/*.js'],
|
|
};
|
|
|
|
const swaggerDocs = swaggerJsDoc(swaggerOptions);
|
|
|
|
const customCss = `
|
|
.swagger-ui .topbar .link {
|
|
display: none;
|
|
}
|
|
`;
|
|
|
|
module.exports = {
|
|
serve: swaggerUi.serve,
|
|
setup: swaggerUi.setup(swaggerDocs, {
|
|
customCss
|
|
}),
|
|
}; |