Skip to content

refactor(monit): drop retired v1 rule clients, add public v2 rule APIs - #74

Merged
UlricQin merged 1 commit into
mainfrom
feat/monit-rule-v2-public
Sep 9, 2026
Merged

refactor(monit): drop retired v1 rule clients, add public v2 rule APIs#74
UlricQin merged 1 commit into
mainfrom
feat/monit-rule-v2-public

Conversation

@UlricQin

@UlricQin UlricQin commented Sep 9, 2026

Copy link
Copy Markdown
Member

变更

vendored OpenAPI 已同步 flashduty-docs(配套 PR: flashcatcloud/flashduty-docs#379)并重新 go generate

  • 移除 WriteCreate / WriteUpdate / ReadInfo / ReadCounterNode / ReadDstypes —— 对应端点已在 monit-webapi 退役(flashcatcloud/monit-webapi#118)并从网关公开注册表移除(flashcatcloud/fc-pgy#957)
  • 新增 /monit/rule/v2/info/monit/rule/v2/create/monit/rule/v2/update 的公开客户端方法(v2 已在网关转为 app_key 可调用)
  • applications.go / schedules.go 的新增方法是 spec 同步顺带带入的其他已公布接口(RUM remote-config、排班相关),非手工修改

⚠️ 破坏性变更

仍在调用被删 v1 方法的 SDK 使用方升级后会编译失败,发版时需要版本说明。

验证

go build ./...go test ./... 通过。

Synced openapi/ from flashduty-docs main and regenerated:

- Remove WriteCreate/WriteUpdate/ReadInfo/ReadCounterNode/ReadDstypes
  (endpoints retired upstream in monit-webapi / removed from the
  public registry in fc-pgy).
- Add ReadInfoV2/WriteCreateV2/WriteUpdateV2 for the new public
  /monit/rule/v2/* contract.
- The applications.go and schedules.go additions come from the spec
  sync pulling in other already-public endpoints (RUM remote-config
  and schedule APIs), not from manual edits.

Note: this is a breaking change for SDK consumers still calling the
removed v1 methods.
@UlricQin
UlricQin merged commit b33b7e6 into main Sep 9, 2026
4 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