Frun1na opened a new pull request, #5702:
URL: https://github.com/apache/rocketmq-dashboard/pull/5702
### Which Issue(s) This PR Fixes
No issue: documentation for endpoints the specification omits. Fourth area
extracted from #4835 (after #5683 for the consumer-group endpoints, #5684 for
LiteTopic and #5686 for the auth pair).
### Brief Description
The cluster section documents the live cluster and NameServer operations,
but not the registry and probe endpoints the cluster pages rely on, nor the
NameServer registry CRUD that §4.5-4.10 does not touch. This adds §4.21-4.28
and their quick-reference rows:
- **4.21** `GET /api/clusters/registry` — clusters from the registry (not
resolved through an instance)
- **4.22** `POST /api/clusters/test-connection` — probe a NameServer address
and report what it answers
- **4.23** `POST /api/clusters/config/preview` — the change preview for a
cluster config update, with the full DTO bounds
- **4.24** `GET /api/clusters/:id/broker-config-diff` — broker config drift,
including the completeness signals
- **4.25** `GET /api/nameservers` — the NameServer registry (Studio-side
inventory, distinct from the live list in §4.1/§4.2)
- **4.26 / 4.27 / 4.28** `POST
/api/nameservers/registry/create|update|delete` — registry entry CRUD
Everything was read off the current code:
| Section | Source |
|---|---|
| 4.21-4.24 | `ClusterController` (`/api/clusters`,
`@GetMapping("/registry")`, `@PostMapping("/test-connection")`,
`@PostMapping("/config/preview")`, `@GetMapping("/{id}/broker-config-diff")`) |
| 4.22 | `TestConnectionDTO` (`@NotBlank namesrvAddr`), `ClusterProbeResult`
(all seven fields) |
| 4.23 | `UpdateConfigDTO` (required `id`; the `@Min`/`@Max` bounds on
`maxMessageSize`, `fileReservedTime`, `writeQueueNums`, `readQueueNums`,
`brokerPermission`), `ClusterConfigPreviewVO` + its `BrokerTargetVO` /
`ConfigChangeVO` |
| 4.24 | `BrokerConfigDiffVO` + its `BrokerStatusVO` / `ConfigDifferenceVO`
/ `ConfigValueVO` (the `complete` / `reachableBrokerCount` completeness pair is
why the section exists) |
| 4.25-4.28 | `NameServerController` (`/api/nameservers`, `@GetMapping` for
the registry list, `/registry/create|update|delete`), `NameserverRegistryVO`,
`CreateNameserverRegistryDTO` / `UpdateNameserverRegistryDTO` (`@NotBlank` +
`@Size` bounds) / `DeleteNameserverRegistryDTO` |
Note on 4.25: the endpoint is `GET /api/nameservers` (the controller's root
mapping), not `GET /api/nameservers/registry` — an earlier draft of this
content carried the longer path, which does not exist.
### How Did You Test This Change?
Documentation only — no code, configuration or test changes.
- Each path matched against its `@GetMapping` / `@PostMapping` declaration
in `ClusterController` and `NameServerController`; each parameter's required
flag against its `@RequestParam` / `@PathVariable` declaration.
- Each request field's required flag and bound against the DTO's validation
annotations, and each response field list against the VO (including the nested
`ClusterConfigPreviewVO` / `BrokerConfigDiffVO` value objects).
- 4.25 was checked against the existing documentation: the specification
documents `/api/nameservers/create|update|restart|upgrade|delete` and
`/api/nameservers/config-diff`, but not the registry list itself.
- Markdown structure checked with `grep -n "^### 4\\."` (4.1-4.28 in order)
and the eight new quick-reference rows (`121`-`128`) are unique.
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits (`feat:` / `fix:` /
`refactor:` / `chore:` / `docs:` / `perf:`)
- [x] Tests added or updated for non-trivial changes, test methods named
`...Test`
- [ ] New UI text has both Chinese and English entries under `web/src/i18n/`
- [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks)
- [ ] New source files carry the ASF license header
- [x] Documentation touched where behaviour changed (README / `docs/` /
in-app help)
---
Fourth area extracted from #4835, which no longer merges after the file
moved 100+ commits underneath it. The quick-reference rows are numbered 121-128
because #5683 adds 108-113, #5684 adds 114-118 and #5686 adds 119-120 to the
same place in the table; whichever merges last needs a one-line renumber, and I
am happy to rebase instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]