[👷] Swagger 제거
All checks were successful
JJ_Back/pipeline/head This commit looks good

This commit is contained in:
김선규 2024-08-20 11:22:41 +09:00
parent 15eef31cc8
commit 7cc458fceb
2 changed files with 24 additions and 24 deletions

View File

@ -2,8 +2,8 @@
import express from 'express';
import bodyParser from 'body-parser';
import swaggerJSDoc from 'swagger-jsdoc';
import swaggerUi from 'swagger-ui-express';
// import swaggerJSDoc from 'swagger-jsdoc';
// import swaggerUi from 'swagger-ui-express';
import path from 'path';
import { fileURLToPath } from 'url';
import cookieParser from 'cookie-parser';
@ -28,29 +28,29 @@ app.use(cookieParser()); // For parsing cookies
app.use(express.static(path.join(__dirname, 'Front'))); // Serve static files from Pront directory
// Swagger setup
const swaggerDefinition = {
openapi: '3.0.0',
info: {
title: 'My API',
version: '1.0.0',
description: 'API documentation',
},
servers: [
{
url: serverURL,
description: 'JJ server',
},
],
};
// const swaggerDefinition = {
// openapi: '3.0.0',
// info: {
// title: 'My API',
// version: '1.0.0',
// description: 'API documentation',
// },
// servers: [
// {
// url: serverURL,
// description: 'JJ server',
// },
// ],
// };
const options = {
swaggerDefinition,
apis: ['./back/apps/app.js'],
};
// const options = {
// swaggerDefinition,
// apis: ['./back/apps/app.js'],
// };
const swaggerSpec = swaggerJSDoc(options);
// const swaggerSpec = swaggerJSDoc(options);
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
// app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
app.use((req, res, next) => {
const host = req.headers.host;

View File

@ -13,7 +13,7 @@
"author": "Team.Stein",
"license": "ISC",
"dependencies": {
"express": "^4.19.2",
"swagger-jsdoc": "^6.2.8"
"express": "^4.19.2"
// "swagger-jsdoc": "^6.2.8"
}
}