Frun1na opened a new issue, #4724:
URL: https://github.com/apache/rocketmq-dashboard/issues/4724
### Which Documentation
`docs/api-spec.md` — §7 ACL 管理, specifically §7.1 获取 ACL 规则列表 and §7.4 获取
ACL 用户列表.
### What Is Wrong
§7.1 describes an endpoint the server does not expose:
- The request line reads `GET
/api/acl/rules?clusterId={clusterId}&principal={principal}`. There is
no `clusterId` parameter — `AclController.listRules` accepts principal,
resource, scope, decision,
instanceId, page and pageSize. A caller following the spec sends a
parameter that is silently
ignored, and cannot filter by the values the controller actually supports.
- The response is documented as a bare `AclRule[]`. The controller returns
`Result<PageResult<AclRuleVO>>`: rows are under `data.items`, with `total`
/ `page` / `size` next to
it. A client written against the spec expects an array and receives an
object.
Both §7.1 and §7.4 also name the creation timestamp `createdAt` and type
`id` as a string.
`AclRuleVO` and `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`), so the documented field name does not exist on the
wire.
### Suggested Change
- §7.1: list principal / resource / scope / decision / instanceId / page /
pageSize as the query
parameters, and present the response as `PageResult<AclRule>` with an
`#### AclRule` sub-table.
- §7.1 / §7.4: `createdAt` → `gmtCreate`, `id` → `number`.
Note that the other `createdAt` occurrences in the spec are correct — those
sections
(`AiConversationVO`, `NotificationDeliveryPageVO`, …) do expose `createdAt`
in Java — so they should
be left as they are.
Opened PR #4723 for this.
--
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]