Refactor Dockerfile and docker-compose.yml to use new directory structure and update volume paths
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
30
models/swagger.js
Normal file
30
models/swagger.js
Normal file
@@ -0,0 +1,30 @@
|
||||
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
|
||||
}),
|
||||
};
|
||||
Reference in New Issue
Block a user