Skip to content

docs(api): add POST /status-page/draft/create to OpenAPI specs - #325

Merged
debidong merged 1 commit into
mainfrom
api-review/20260831-082324
Aug 31, 2026
Merged

docs(api): add POST /status-page/draft/create to OpenAPI specs#325
debidong merged 1 commit into
mainfrom
api-review/20260831-082324

Conversation

@flashduty

@flashduty flashduty Bot commented Aug 31, 2026

Copy link
Copy Markdown

api-review 每日审计(2026-08-31, --mode generate --scope all --auto)

Registry 基线: fc-pgy @ 295841b(logic/api/api_test.go,925 行,auth=all 公开 323 条)
Spec 基线: flashduty-docs HEAD f57445b

审计结果

模块 registry spec missing extra
On-call 192 191 → 192 1(本 PR 补齐) 0
Monitors 29 39 0 10(见下方说明)
RUM 33 36 0 3(见下方说明)
AI SRE 42 42 0 0
Platform 27 27 0 0

Operation 变化

  • On-call: added 1POST /status-page/draft/create(fc-pgy#870 新注册,auth=all,IsAudit=true,限流 300 req/min + 20 req/s per account)。Handler 与输入输出结构来自 fc-statuspage/cmd/server/controller/draft/draft.godraftCreateIn/draftCreateOut);约束(source maxLength=64、payload 上限 64 KB、draft_id 格式 draft_[A-Za-z0-9]{22}、30 天保留期/一次性消费)均来自 handler 与 logic/draft 显式代码,未从业务分支臆造。
  • updated 0, removed 0;其余四个模块无漂移。

同步 reconcile:docs.json 中/英文导航各 +1 行;{en,zh}/openapi/api-catalog.mdx 新增目录行,计数 On-call 191→192、总计 335→336。

Unresolved

0 —— 本轮无 registry 行找不到 handler。

构造示例说明(无法调用 dev API 抓真实响应)

本环境不能引用凭据环境变量,以下示例为按 schema 构造的 realistic 值(非 dev API 实测):

  • POST /status-page/draft/create 的 requestBody 与 200 响应 example(draft_id 遵循 draft_[A-Za-z0-9]{22} 格式,created_at 为 Unix epoch 秒)。

过程备注

  • 已知 mapping.yaml 缺口(/monit/query/*/monit/servicemap/*/monit/targets/monit/tools/*/rum/data|field|resource/* 共 13 条已注册 path 无 path_prefixes):这些 operation 已在 spec 中,审计以集合比对确认为零漂移,未做改动。
  • monitors 模块:monit-webapi 不在 GitHub,沿用 HEAD 内容。
  • 知识包补丁脚本 runbooks/api-review-apply-patches.py 仍缺失,本轮采用确定性审计 + 单 operation 手工生成;diff 经 sort-key 深比较验证:除本 operation 及其 2 个 schema 外,所有 spec 文件与 HEAD 字节级一致(无排序噪音),docs.json 仅 2 处新增行。
  • created_at 为秒级(row.CreatedAt.Unix()),description 含 "Unix epoch seconds",不含 millisecond 字样。

Registered in fc-pgy (flashcatcloud/fc-pgy#870, auth=all) but missing from
the API reference. Adds the operation + CreateStatusPageDraftRequest /
StatusPageDraftCreateResponse schemas to the on-call module and consolidated
specs (EN+ZH), and reconciles docs.json nav and api-catalog.mdx counts
(On-call 191 -> 192, total 335 -> 336).
@debidong
debidong merged commit f2ffc5e into main Aug 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant