unbridled-41 opened a new issue, #5469:
URL: https://github.com/apache/rocketmq-dashboard/issues/5469

   ### 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` §5.5 (delete Topic), §5.8 (send), §6.6 (delete Group), 
§6.7 (reset offset), §6.8 (import groups).
   
   ### What Is Wrong
   
   Requests built exactly as documented are rejected with 400:
   
   | Section | Spec said | Code requires |
   |---|---|---|
   | §5.5 delete Topic | `name` only | `DeleteTopicDTO.instanceId` 
`@NotBlank(message = "instanceId is required")` |
   | §5.8 send | no `instanceId` | `MetadataService.sendMessage` → 
`requireWriteInstance(..., required=true)` |
   | §6.6 delete Group | `name` only | `DeleteConsumerGroupDTO.instanceId` 
`@NotBlank(...)` |
   | §6.7 reset offset | `timestamp` as an ISO 8601 string, `topic` optional 
("不传则全部重置") | `ResetConsumerOffsetDTO`: `@NotBlank instanceId`, `@NotBlank 
name`, `@NotBlank topic`, `@NotNull @Positive Long timestamp`; no reset-all 
branch exists on this endpoint |
   | §6.8 import | `multipart/form-data` with a `file` field, response 
`{imported, failed, errors}` | `ConsumerGroupController` takes `@Valid 
@RequestBody ImportConsumerGroupsDTO` (`instanceId`, `groups`); the result 
carries `groups`/`failures[{index,name,message}]`. `grep -rn "MultipartFile" 
server/src/main/java` is empty |
   
   ### Suggested Change
   
   Align the five request/response tables with the DTOs, and note the import 
cap (`@Size(max = 100)`).
   
   ### Evidence
   
   - DTOs and controllers as cited above; the MCP tool catalog already 
documents the real reset contract (`tool-catalog/tools/group.yaml`: `topicName` 
required, epoch milliseconds).
   - The aligned contracts are now pinned by tests: `DeleteTopicDTOTest` and 
`GroupWriteRequestValidationTest` (`cd server && mvn -o test 
-Dtest='DeleteTopicDTOTest,GroupWriteRequestValidationTest'` → `Tests run: 7, 
Failures: 0, Errors: 0`).
   
   ### Impact
   
   Every documented write request in these sections fails validation, so an 
integrator cannot use them as written.
   
   ### Acceptance Criteria
   
   - The tables match the DTO annotations and the controller signatures.
   
   Related: #4811 (the same family of divergences; it also lists §5.1/§6.1 
field names, §6.5 requiredness, §5.8's `messageGroup`/`deliveryTimestamp`, and 
§8.1 — items this change does not touch).
   
   **Corresponding PR:** #5438
   


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