|
|
|
@ -1,13 +1,13 @@
|
|
|
|
import type { Router } from "express";
|
|
|
|
import type { Router } from "express";
|
|
|
|
import swaggerUi from "swagger-ui-express";
|
|
|
|
import swaggerUi from "swagger-ui-express";
|
|
|
|
import { readFileSync } from "fs";
|
|
|
|
import { readFile } from "fs/promises";
|
|
|
|
import { fileURLToPath } from "url";
|
|
|
|
import { fileURLToPath } from "url";
|
|
|
|
import { dirname, join } from "path";
|
|
|
|
import { dirname, join } from "path";
|
|
|
|
import yaml from "js-yaml";
|
|
|
|
import yaml from "js-yaml";
|
|
|
|
|
|
|
|
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
|
const swaggerDocument = yaml.load(
|
|
|
|
const swaggerDocument = yaml.load(
|
|
|
|
readFileSync(join(__dirname, "../etapi/etapi.openapi.yaml"), "utf8")
|
|
|
|
await readFile(join(__dirname, "../etapi/etapi.openapi.yaml"), "utf8")
|
|
|
|
) as object;
|
|
|
|
) as object;
|
|
|
|
|
|
|
|
|
|
|
|
function register(router: Router) {
|
|
|
|
function register(router: Router) {
|
|
|
|
|