Create swagger.js
Browse files- swagger.js +23 -0
swagger.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// swagger.js
|
2 |
+
const swaggerJsDoc = require('swagger-jsdoc');
|
3 |
+
|
4 |
+
const swaggerOptions = {
|
5 |
+
definition: {
|
6 |
+
openapi: '3.0.0',
|
7 |
+
info: {
|
8 |
+
title: 'AkenoX API Js',
|
9 |
+
version: '1.0.0',
|
10 |
+
description: 'API documentation for my project',
|
11 |
+
},
|
12 |
+
servers: [
|
13 |
+
{
|
14 |
+
url: 'https://randydev-ryu-js.hf.space', // Your API base URL
|
15 |
+
},
|
16 |
+
],
|
17 |
+
},
|
18 |
+
apis: ['./*.js'],
|
19 |
+
};
|
20 |
+
|
21 |
+
const swaggerDocs = swaggerJsDoc(swaggerOptions);
|
22 |
+
|
23 |
+
module.exports = swaggerDocs;
|