iloveeyjafjalla opened a new pull request, #7289:
URL: https://github.com/apache/rocketmq-dashboard/pull/7289
### Which Issue(s) This PR Fixes
- Fixes #7288
### Brief Description
`docs/api-spec.md` §5.10 documents `popProgress`, which `GET
/api/liteTopic/session/{sessionId}` never returns: #6144 removed the field from
`LiteTopicSessionVO`, `LiteTopicSession`, the `rmq.litetopic.session` contract
and the tool catalog, following the same "drop the fabricated field" decision
as #5600. The section also omits `consumedScanTruncated`, introduced by #6114
so a caller knows that `consumedMessages` is a lower bound when the
consumed-offset scan stops at the lite-topic cap (`RocketMQLiteTopicProvider`
sets the flag, `LiteTopicService.toSessionVO` maps it, and the console renders
the count as a partial sum).
The table now names exactly the properties the controller serializes.
`docs/api-spec.md` is what API clients code against, so a fabricated row sends
them after a value that never arrives while a missing row hides the one flag
that changes how `consumedMessages` must be read.
### Verifying
Red first, with the doc section still unchanged:
```
$ mvn -B -ntp -Dtest=LiteTopicSessionApiSpecTest
-Dsurefire.failIfNoSpecifiedTests=false test
...
elements not found:
["consumedScanTruncated"]
and elements not expected:
["popProgress"]
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
```
Green after the documentation fix:
```
$ mvn -B -ntp -Dtest=LiteTopicSessionApiSpecTest
-Dsurefire.failIfNoSpecifiedTests=false test
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS
```
The new test reads `docs/api-spec.md`, extracts the §5.10 field table and
compares it with the properties Jackson serializes for a `LiteTopicSessionVO`,
so the next field added to or removed from the view has to touch the spec as
well. Checkstyle runs in the `validate` phase of the same command and passes.
--
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]