mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-15 21:03:47 +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 __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
const projectRoot = path.join(__dirname, "..", "..", "..");
|
|
||||||
|
|
||||||
const swaggerOptions: swaggerJSDoc.Options = {
|
const swaggerOptions: swaggerJSDoc.Options = {
|
||||||
definition: {
|
definition: {
|
||||||
openapi: "3.0.3",
|
openapi: "3.0.3",
|
||||||
@@ -118,9 +116,10 @@ const swaggerOptions: swaggerJSDoc.Options = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
apis: [
|
apis: [
|
||||||
path.join(projectRoot, "src", "backend", "database", "routes", "*.ts"),
|
path.join(__dirname, "database", "routes", "*.js").replace(/\\/g, "/"),
|
||||||
path.join(projectRoot, "src", "backend", "dashboard.ts"),
|
path.join(__dirname, "dashboard.js").replace(/\\/g, "/"),
|
||||||
path.join(projectRoot, "src", "backend", "ssh", "*.ts"),
|
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 swaggerSpec = swaggerJSDoc(swaggerOptions);
|
||||||
|
|
||||||
const outputPath = path.join(projectRoot, "openapi.json");
|
const outputPath = path.join(__dirname, "..", "..", "..", "openapi.json");
|
||||||
|
|
||||||
await fs.writeFile(
|
await fs.writeFile(
|
||||||
outputPath,
|
outputPath,
|
||||||
|
|||||||
Reference in New Issue
Block a user