Wang1rrr opened a new pull request, #5526:
URL: https://github.com/apache/rocketmq-dashboard/pull/5526
<!-- Make sure the base branch is `rocketmq-studio`: that is the RocketMQ
Studio trunk. -->
### Which Issue(s) This PR Fixes
- Fixes #4862
This replaces #4863, which the stale bot closed before review and which can
no longer be reopened. It is rebased onto the current trunk and rechecked
against the current code.
### Brief Description
LiteTopic has a dedicated console page
(`web/src/pages/studio/LiteTopic.tsx`), but `docs/api-spec.md` documents none
of its five endpoints (`LiteTopicController`). The sibling DLQ endpoints were
documented in #4859. This adds **§17 轻量主题 LiteTopic** and quick-reference rows
108–112, placed after the DLQ and Proxy rows that have landed since.
| Section | Endpoint | What is written down |
| --- | --- | --- |
| §17.1 | `GET /api/liteTopic/list` | `pattern` is a substring match;
`LiteTopicItem`; how `ttlStatus` is derived; 501 when no NameServer is
configured, 503 with no broker master |
| §17.2 | `GET /api/liteTopic/session/{sessionId}` | the opaque session id;
`LiteTopicSession` / `SessionLiteTopic` and their null semantics; 400 / 404 |
| §17.3 | `POST /api/liteTopic/extendTTL` | body `instanceId` /
`topicPattern` / `newTTL`; all-or-nothing write of `lite.topic.expiration`; 400
/ 404 / 409 |
| §17.4 | `GET /api/liteTopic/quota` | `LiteTopicQuota`; the usage rates are
0–1 ratios; fields the broker does not expose |
| §17.5 | `GET /api/liteTopic/capability` | `supported` |
Compared with #4863, §17.3 now matches the current `LiteTopicTTLUpdateDTO` /
`LiteTopicService.extendTTL`. `instanceId` is a required body field, and the
error table lists the `Instance not found`, `Resource ownership is not
registered yet` (404) and `belongs to instance` / derived-topic (409) cases
from `ResourceOwnershipGuard`.
### How Did You Test This Change?
Documentation only. Every field was checked against `LiteTopicItemVO`,
`LiteTopicSessionVO`, `LiteTopicQuotaVO`, `LiteTopicCapabilityVO` and
`LiteTopicTTLUpdateDTO`, and every status code against `LiteTopicService`,
`ResourceOwnershipGuard` and `RocketMQLiteTopicProvider` (`requireAdmin` → 501,
no master → 503) on the current trunk.
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits (`feat:` / `fix:` /
`refactor:` / `chore:` / `docs:` / `perf:`)
- [ ] Tests added or updated for non-trivial changes, test methods named
`...Test` (docs only)
- [ ] New UI text has both Chinese and English entries under `web/src/i18n/`
(no UI text)
- [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks) (no code)
- [ ] New source files carry the ASF license header (no new files)
- [x] Documentation touched where behaviour changed (README / `docs/` /
in-app help)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]