Commit 5a7d3b45 by luoqi

fix(openapi): servers 从 PAC_API_BASE_URL 读 —— 修 Scalar cURL 回退 example.com

build-document 加 .addServer(env);重新生成 pac.json,servers=https://pac.jarvismedical.asia(paths 已含 /pac/v1)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 8e128602
Pipeline #3330 failed in 0 seconds
...@@ -2477,7 +2477,12 @@ ...@@ -2477,7 +2477,12 @@
"description": "数据摄入与增量同步。" "description": "数据摄入与增量同步。"
} }
], ],
"servers": [], "servers": [
{
"url": "https://pac.jarvismedical.asia",
"description": "PAC API"
}
],
"components": { "components": {
"securitySchemes": { "securitySchemes": {
"accessToken": { "accessToken": {
......
...@@ -64,6 +64,9 @@ export function buildPacOpenApiDocument(app: INestApplication): OpenAPIObject { ...@@ -64,6 +64,9 @@ export function buildPacOpenApiDocument(app: INestApplication): OpenAPIObject {
'Patient Analysis Center — three-pool framework (facts in, plans out, agents inside).', 'Patient Analysis Center — three-pool framework (facts in, plans out, agents inside).',
) )
.setVersion('0.1.0') .setVersion('0.1.0')
// server 地址从 env 读(Scalar 的 cURL / Send 拿它当 base;不设则 localhost)。
// 公开文档站的 spec 用 PAC_API_BASE_URL=https://<生产域名> 生成;paths 已含 /pac/v1 前缀,此处只填域名。
.addServer(process.env.PAC_API_BASE_URL ?? 'http://localhost:3101', 'PAC API')
.addBearerAuth( .addBearerAuth(
{ type: 'http', scheme: 'bearer', bearerFormat: 'JWT', name: 'Authorization', in: 'header' }, { type: 'http', scheme: 'bearer', bearerFormat: 'JWT', name: 'Authorization', in: 'header' },
'accessToken', 'accessToken',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment