Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/
Upload File :
Current File : /home/infinitibizsol/.trash/swagger.js

/* import swaggerJsDoc from "swagger-jsdoc";
import swaggerUi from "swagger-ui-express";

// Basic metadata about the API
const options = {
  definition: {
    openapi: "3.0.0",
    info: {
      title: "INSUR-CRM API",
      version: "1.0.0",
      description: "A simple Express insure-crm Management API",
    },
    servers: [
      {
        url: "http://localhost:3000",
      },
    ],
  },
  apis: ["./routes/*.js", "./docs/*.js"], // Files containing annotations
};

const specs = swaggerJsDoc(options);

export { swaggerUi, specs };
 */

import swaggerJsDoc from "swagger-jsdoc";
import swaggerUi from "swagger-ui-express";

// Basic metadata about the API
const options = {
  definition: {
    openapi: "3.0.0",
    info: {
      title: "INSUR-CRM API",
      version: "1.0.0",
      description: "A simple Express insure-crm Management API",
    },
    servers: [
      {
        url: "http://localhost:3000",
      },
    ],
    components: {
      securitySchemes: {
        // Basic Auth
        /* basicAuth: {
          type: "http",
          scheme: "basic",
        }, */
        // Bearer Auth (JWT)
        bearerAuth: {
          type: "http",
          scheme: "bearer",
          bearerFormat: "JWT",
        },
      },
    },
    security: [
      // Apply globally, can be overridden at the path level
      {
        // basicAuth: [], // For Basic Authentication
        // Alternatively, use bearerAuth if using JWT
        bearerAuth: [],
      },
    ],
  },
  apis: ["./routes/*.js", "./docs/*.js"], // Files containing annotations
};

const specs = swaggerJsDoc(options);

export { swaggerUi, specs };

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists