Spaces:
Runtime error
Runtime error
import swaggerJSDoc, { Options } from "swagger-jsdoc"; | |
import { APP_CONFIG } from "../config/app.config"; | |
const swaggerOptions: Options = { | |
swaggerDefinition: { | |
openapi: "3.0.0", | |
info: { | |
title: "FusionBills Express API", | |
version: "1.0.0", | |
description: "FusionBills Express API Swagger", | |
}, | |
servers: [ | |
{ | |
url: APP_CONFIG.appURL, | |
description: "API documentation", | |
}, | |
], | |
schemes: ["http", "https"], | |
basePath: "/", | |
components: { | |
securitySchemes: { | |
bearerAuth: { | |
type: "http", | |
scheme: "bearer", | |
bearerFormat: "JWT", | |
}, | |
}, | |
}, | |
security: [ | |
{ | |
bearerAuth: [], | |
}, | |
], | |
}, | |
apis: ["**/*.routes.ts"], | |
}; | |
export const swaggerDocs = swaggerJSDoc(swaggerOptions); | |