Loading backend/api-docs/api-docs.yaml 0 → 100644 +1411 −0 File added.Preview size limit exceeded, changes collapsed. Show changes backend/package-lock.json +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ "cors": "^2.8.5", "dotenv": "^16.4.5", "express": "^4.19.2", "js-yaml": "^4.1.0", "swagger-jsdoc": "^6.2.8", "swagger-ui-express": "^5.0.1", "zod": "^3.22.4", Loading backend/package.json +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ "cors": "^2.8.5", "dotenv": "^16.4.5", "express": "^4.19.2", "js-yaml": "^4.1.0", "swagger-jsdoc": "^6.2.8", "swagger-ui-express": "^5.0.1", "zod": "^3.22.4", Loading backend/src/index.ts +5 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ config(); const app = express(); const port = env.PORT ?? 3000; const fs = require('fs'); const yaml = require('js-yaml'); const swaggerJsdoc = require('swagger-jsdoc'); const swaggerUi = require('swagger-ui-express'); Loading Loading @@ -43,6 +45,9 @@ const options = { apis: ['./**/router.ts'], }; const specs = swaggerJsdoc(options); fs.writeFileSync('./api-docs/api-docs.yaml', yaml.dump(specs)); app.use(cors()); app.use(express.json()); Loading @@ -54,8 +59,6 @@ app.use('/api/v1/playlists', playlistsRouter); app.use('/api/v1/posts', postsRouter); app.use('/api/v1/reviews', reviewsRouter); app.use('/api/v1/users', usersRouter); const specs = swaggerJsdoc(options); app.use( '/api-docs', swaggerUi.serve, Loading Loading
backend/api-docs/api-docs.yaml 0 → 100644 +1411 −0 File added.Preview size limit exceeded, changes collapsed. Show changes
backend/package-lock.json +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ "cors": "^2.8.5", "dotenv": "^16.4.5", "express": "^4.19.2", "js-yaml": "^4.1.0", "swagger-jsdoc": "^6.2.8", "swagger-ui-express": "^5.0.1", "zod": "^3.22.4", Loading
backend/package.json +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ "cors": "^2.8.5", "dotenv": "^16.4.5", "express": "^4.19.2", "js-yaml": "^4.1.0", "swagger-jsdoc": "^6.2.8", "swagger-ui-express": "^5.0.1", "zod": "^3.22.4", Loading
backend/src/index.ts +5 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ config(); const app = express(); const port = env.PORT ?? 3000; const fs = require('fs'); const yaml = require('js-yaml'); const swaggerJsdoc = require('swagger-jsdoc'); const swaggerUi = require('swagger-ui-express'); Loading Loading @@ -43,6 +45,9 @@ const options = { apis: ['./**/router.ts'], }; const specs = swaggerJsdoc(options); fs.writeFileSync('./api-docs/api-docs.yaml', yaml.dump(specs)); app.use(cors()); app.use(express.json()); Loading @@ -54,8 +59,6 @@ app.use('/api/v1/playlists', playlistsRouter); app.use('/api/v1/posts', postsRouter); app.use('/api/v1/reviews', reviewsRouter); app.use('/api/v1/users', usersRouter); const specs = swaggerJsdoc(options); app.use( '/api-docs', swaggerUi.serve, Loading