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

   ### Which Issue(s) This PR Fixes
   
   ### Brief Description
   
   Three parts of the §7 ACL section describe an API the server does not expose:
   
   - **§7.1 request.** The spec shows `GET 
/api/acl/rules?clusterId={clusterId}&principal={principal}`.
     `AclController.listRules` accepts principal, resource, scope, decision, 
instanceId, page (default 1)
     and pageSize (default 20) — there is no `clusterId` parameter, so a caller 
following the spec sends
     a parameter that is ignored and cannot filter the way the spec implies.
   - **§7.1 response.** The spec shows a bare `AclRule[]`. The controller 
returns
     `Result<PageResult<AclRuleVO>>`, so the rows live under `data.items` with 
`total` / `page` / `size`
     alongside. A client written against the spec finds an object where it 
expects an array.
   - **§7.1 / §7.4 timestamp and id types.** Both tables named the creation 
timestamp `createdAt` and
     typed `id` as a string. `AclRuleVO` / `AclUserVO` expose `gmtCreate` and a 
`Long id`; there is no
     Jackson naming strategy in `application.yml` and no `@JsonProperty`, and 
the web client reads
     `gmtCreate` (`web/src/api/acl.ts`).
   
   The section now matches the controller. No behaviour changed.
   
   ### How Did You Test This Change?
   
   Documentation only, so the Maven and Vitest suites were not re-run. Every 
field, parameter and type
   was read off the implementation rather than inferred:
   
   ```
   $ sed -n '/@GetMapping("\/rules")/,/^    }/p' 
.../instance/acl/AclController.java
       @GetMapping("/rules")
       public Result<PageResult<AclRuleVO>> listRules(
               @RequestParam(required = false) String principal,
               @RequestParam(required = false) String resource,
               @RequestParam(required = false) String scope,
               @RequestParam(required = false) String decision,
               @RequestParam(required = false) String instanceId,
               @RequestParam(defaultValue = "1") Integer page,
               @RequestParam(defaultValue = "20") Integer pageSize)
   
   $ grep -n 'private' .../instance/acl/AclRuleVO.java
       private Long id; ... private LocalDateTime gmtCreate;      # not 
createdAt
   
   $ grep -n 'private' .../instance/acl/AclUserVO.java
       private Long id; ... private LocalDateTime gmtCreate;
   
   # the wire name is gmtCreate, not a renamed createdAt:
   $ grep -n 'gmtCreate' web/src/api/acl.ts
       gmtCreate?: string | null;
   $ grep -n 'jackson' server/src/main/resources/application.yml
       (no naming strategy configured)
   ```
   
   The remaining `createdAt` occurrences elsewhere in the spec were left alone: 
those sections
   (`AiConversationVO`, `NotificationDeliveryPageVO`, …) really do expose 
`createdAt` in Java, so they
   are correct as written.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`docs:`)
   - [ ] 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)
   


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