CoolFace
Apppublic

sifars/automated-invoice-processing-agent-backend

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
swagger.ts39 linesDownload Raw Back to utils
1import swaggerJSDoc, { Options } from "swagger-jsdoc";2import { APP_CONFIG } from "../config/app.config";3 4const swaggerOptions: Options = {5  swaggerDefinition: {6    openapi: "3.0.0",7    info: {8      title: "FusionBills Express API",9      version: "1.0.0",10      description: "FusionBills Express API Swagger",11    },12    servers: [13      {14        url: APP_CONFIG.appURL,15        description: "API documentation",16      },17    ],18    schemes: ["http", "https"],19    basePath: "/",20    components: {21      securitySchemes: {22        bearerAuth: {23          type: "http",24          scheme: "bearer",25          bearerFormat: "JWT",26        },27      },28    },29    security: [30      {31        bearerAuth: [],32      },33    ],34  },35  apis: ["**/*.routes.ts"],36};37 38export const swaggerDocs = swaggerJSDoc(swaggerOptions);39