chore: Add OpenAPI support for statistics endpoint#39932
chore: Add OpenAPI support for statistics endpoint#39932vivekyarra wants to merge 1 commit intoRocketChat:developfrom
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 431093f The changes in this PR will be included in the next version bump. This PR includes changesets to release 41 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (11)📓 Common learnings📚 Learning: 2026-02-24T19:09:09.561ZApplied to files:
📚 Learning: 2026-03-16T21:50:37.589ZApplied to files:
📚 Learning: 2026-03-20T13:52:29.575ZApplied to files:
📚 Learning: 2026-03-14T14:58:58.834ZApplied to files:
📚 Learning: 2026-02-25T20:10:16.987ZApplied to files:
📚 Learning: 2026-03-16T23:33:15.721ZApplied to files:
📚 Learning: 2026-02-23T17:53:06.802ZApplied to files:
📚 Learning: 2026-02-24T19:09:01.522ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
🔇 Additional comments (4)
WalkthroughAdded OpenAPI support to the statistics endpoint by introducing runtime request query validation for the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Proposed changes
Migrates the
statisticsREST API endpoint from the deprecatedAPI.v1.addRoutepattern to the newAPI.v1.getpattern with OpenAPI support.API.v1.addRoute('statistics', ...)withAPI.v1.get('statistics', options, action)refreshquery paramIssue(s)
Relates to #34983
Steps to test or reproduce
GET /api/v1/statistics— should return stats as beforeGET /api/v1/statistics?refresh=true— should return fresh statsFurther comments
GSoC 2026 contributor applying for the OpenClaw Integration project. This is my qualifying PR following the same migration pattern used in #39225 and #39227.
Summary by CodeRabbit