mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-09 00:30:49 +00:00
fix: swagger.ts not including all comments
This commit is contained in:
@@ -7,8 +7,6 @@ import { systemLogger } from "./utils/logger.js";
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
const projectRoot = path.join(__dirname, "..", "..", "..");
|
||||
|
||||
const swaggerOptions: swaggerJSDoc.Options = {
|
||||
definition: {
|
||||
openapi: "3.0.3",
|
||||
@@ -118,9 +116,10 @@ const swaggerOptions: swaggerJSDoc.Options = {
|
||||
],
|
||||
},
|
||||
apis: [
|
||||
path.join(projectRoot, "src", "backend", "database", "routes", "*.ts"),
|
||||
path.join(projectRoot, "src", "backend", "dashboard.ts"),
|
||||
path.join(projectRoot, "src", "backend", "ssh", "*.ts"),
|
||||
path.join(__dirname, "database", "routes", "*.js").replace(/\\/g, "/"),
|
||||
path.join(__dirname, "dashboard.js").replace(/\\/g, "/"),
|
||||
path.join(__dirname, "ssh", "*.js").replace(/\\/g, "/"),
|
||||
path.join(__dirname, "guacamole", "routes.js").replace(/\\/g, "/"),
|
||||
],
|
||||
};
|
||||
|
||||
@@ -132,7 +131,7 @@ async function generateOpenAPISpec() {
|
||||
|
||||
const swaggerSpec = swaggerJSDoc(swaggerOptions);
|
||||
|
||||
const outputPath = path.join(projectRoot, "openapi.json");
|
||||
const outputPath = path.join(__dirname, "..", "..", "..", "openapi.json");
|
||||
|
||||
await fs.writeFile(
|
||||
outputPath,
|
||||
|
||||
Reference in New Issue
Block a user