docs(api): add POST /status-page/draft/create to OpenAPI specs - #325
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
审计结果
Operation 变化
POST /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.go(draftCreateIn/draftCreateOut);约束(sourcemaxLength=64、payload 上限 64 KB、draft_id 格式draft_[A-Za-z0-9]{22}、30 天保留期/一次性消费)均来自 handler 与logic/draft显式代码,未从业务分支臆造。同步 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 秒)。过程备注
/monit/query/*、/monit/servicemap/*、/monit/targets、/monit/tools/*、/rum/data|field|resource/*共 13 条已注册 path 无 path_prefixes):这些 operation 已在 spec 中,审计以集合比对确认为零漂移,未做改动。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 字样。