chore(P14-8): 完成运营化与验收收口

这个提交包含在:
2026-03-06 23:24:16 +08:00
父节点 b50b084100
当前提交 d8fff0ba21
共修改 28 个文件,包含 2820 行新增和 123 行删除
+26
查看文件
@@ -0,0 +1,26 @@
const fs = require("fs");
const { buildApp } = require("../src/app");
async function main() {
process.env.NODE_ENV = "development";
process.env.OPENAPI_DOCS_ENABLED = "true";
const app = await buildApp();
await app.ready();
const openapiObj = app.swagger();
const args = process.argv.slice(2);
const outIndex = args.indexOf("--out");
const outPath = outIndex !== -1 ? args[outIndex + 1] : "/tmp/openapi.json";
fs.writeFileSync(outPath, JSON.stringify(openapiObj, null, 2), "utf8");
console.log(`OpenAPI schema exported to ${outPath}`);
await app.close();
}
main().catch((err) => {
console.error(err);
process.exit(1);
});