docs(monit): retire v1 alert rule endpoints, document public v2 contract - #379
Merged
Conversation
- Remove /monit/rule/info, /monit/rule/create, /monit/rule/update, /monit/rule/counter/node (retired in monit-webapi) and /monit/rule/dstypes (route and registry row no longer exist) from the monitors module spec and the consolidated reference copies. - Add /monit/rule/v2/info, /monit/rule/v2/create, /monit/rule/v2/update with full bilingual operations and AlertRuleV2 schemas extracted from the monit-webapi Go types, including lifecycle v2 enums, rate limits, permission classes and request/response examples. - Reconcile docs.json pages and the zh/en API catalog tables; drop orphaned schemas (AlertRuleInfoResponse, RuleCounterNodeResponse, RuleDsTypesResponse, DSType) and dangling references to the deleted dstypes endpoint. Validated with scripts/lint_openapi.py (12 spec files, no violations).
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.
背景
monit-webapi 退役了 v1 告警规则接口(PR: flashcatcloud/monit-webapi#118),fc-pgy 同步将 v2 接口转为 app_key 公开(PR: flashcatcloud/fc-pgy#957)。本 PR 让公开文档与之对齐。
删除(5 个 path,monitors 模块文件 + 合并参考版同步)
/monit/rule/info、/monit/rule/create、/monit/rule/update—— v1 退役/monit/rule/counter/node—— 退役/monit/rule/dstypes—— 后端路由与网关注册早已不存在,死文档连带清理:孤儿 schema(AlertRuleInfoResponse、RuleCounterNodeResponse、RuleDsTypesResponse、DSType),以及保留接口里对已删 dstypes 的悬挂引用。
新增(3 个 path,完整双语文档)
/monit/rule/v2/info、/monit/rule/v2/create、/monit/rule/v2/update导航同步
docs.json:zh/en 两组 Monitors pages 删 5 加 3zh/en/openapi/api-catalog.mdx:目录表删 5 行加 3 行验证
python3 scripts/lint_openapi.py通过(12 个文件无违规);4 个 JSON 可解析;zh/en 结构一致(path/operationId/schema key 相同)。已知历史遗留(本 PR 未处理)
api-catalog.mdx 的 Monitors 折叠面板混入了 RUM 的 41 行、标题计数与实际不符,建议单独修。
建议合并顺序:monit-webapi#118 → fc-pgy#957 → 本 PR。