Frun1na opened a new pull request, #4807:
URL: https://github.com/apache/rocketmq-dashboard/pull/4807

   ### Which Issue(s) This PR Fixes
   
   - Fixes #ISSUE_ID
   
   ### Brief Description
   
   Section 4 (cluster / NameServer / Proxy) documents request fields and 
response shapes the controllers
   do not have. Every row below was read back from the implementation:
   
   | Section | Document said | The code does |
   |---|---|---|
   | 4.3 `POST /api/clusters/config/update` | response `ClusterInfo` | 
`Result<ClusterConfigUpdateResultVO>` — `{cluster, status: 
SUCCESS/PARTIAL/FAILED, successfulBrokers, failedBrokers}` 
(`ClusterController:70`, `ClusterConfigUpdateResultVO`) |
   | 4.4 broker restart | response `{success: boolean, message: string}` | 
`Result<Map>` with only `{message}`; failure throws 500 instead of returning 
`success: false` (`ClusterController:88-98`) |
   | 4.5 NameServer create | request `{clusterId, addr}` | 
`CreateNameServerDTO` also takes optional `version` |
   | 4.6 NameServer update | request `{clusterId, addr, newAddr?}`; response 
`NameServerInfo` | `UpdateNameServerDTO` = `{clusterId, addr, version?}` — 
there is no `newAddr` anywhere in the codebase; response is `Result<Void>` 
(`NameServerController:83-88`) |
   | 4.7 NameServer restart | request `{addr}`; response `{success: boolean}` | 
`RestartNameServerDTO` requires `{clusterId, addr}`; response `Result<Void>` 
(`NameServerController:90-97`) |
   | 4.8 NameServer upgrade | request `{addr}`; response `{success: boolean}` | 
`UpgradeNameServerDTO` requires `{clusterId, addr, targetVersion}`; response 
`Result<Void>` |
   | 4.9 NameServer delete | request `{addr}`; response `{success: boolean}` | 
`DeleteNameServerDTO` requires `{clusterId, addr}`; response `Result<Void>` |
   | 4.11 Proxy restart | request `{addr}`; response `{success: boolean}` | 
`RestartProxyDTO` requires `{clusterId, addr}`; response `Result<Void>` 
(`ProxyController:72-79`) |
   
   Following the codebase's error-grading convention, a mutation endpoint that 
returns `Result<Void>`
   reports failure through the error response, not a `success` boolean in 
`data` — the documented
   `{success}` shape would have integrators looking for a field that never 
appears.
   
   ### How Did You Test This Change
   
   Documentation-only change; there is no docs build or spec validation to run. 
Every claim in the table
   was verified by reading the controller mapping, the DTO validation 
annotations and the response type
   directly (file and line cited per row).
   


-- 
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]

Reply via email to