unbridled-41 opened a new issue, #5467:
URL: https://github.com/apache/rocketmq-dashboard/issues/5467
### Studio Version
branch: `rocketmq-studio` @ `6a68042f` (the revision verified; the branch is
based on it)
deployed as: built from source (unit tests)
### Which Documentation
`docs/api-spec.md` §4.5-4.9 (create / update / restart / upgrade / delete
NameServer).
### What Is Wrong
The five sections document success responses (`NameServerInfo`, `{ success:
boolean }`), but every one of them ends in `501`:
- `cluster/broker/ClusterService.java:581-624` — `createNameServer`,
`updateNameServer`, `restartNameServer`, `upgradeNameServer`,
`deleteNameServer` each validate the command/cluster/address and then `throw
unsupportedOperation(...)`, mapped to `501` by `GlobalExceptionHandler`.
- The spec already handles the identical situation for the Proxy restart
(§4.11 carries a warning paragraph and a `501` row), but these five were
missed, and the implemented endpoints (`GET /api/nameservers`, `POST
/api/nameservers/registry/{create,update,delete}`) appear nowhere in the
document.
### Suggested Change
Add the §4.11-style warning to each of the five sections and point readers
at the implemented registry endpoints.
### Evidence
- `ClusterService.java:581-624` (all five methods end in
`unsupportedOperation`), the §4.11 precedent (`docs/api-spec.md:655,663`),
`NameServerController.java:43-67` (the implemented endpoints); before this
change `grep -c registry docs/api-spec.md` was 0.
- The 501 behaviour is already pinned by tests:
`ClusterServiceTest.java:623,648,650,652,654` with the helper asserting the
`BusinessException` code `501` (`:798-803`); `cd server && mvn -o test
-Dtest=ClusterServiceTest` → `Tests run: 43, Failures: 0, Errors: 0`.
### Impact
An integrator following the spec builds requests that can never succeed, and
the working alternative is undiscoverable from the document.
### Acceptance Criteria
- The five sections state that the operations are unimplemented and name the
implemented endpoints.
Related: #4808 (the same section's field-level divergences — a separate,
still-open problem).
**Corresponding PR:** #5435
--
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]