chore: migrate roles.list endpoint to new chained API pattern with OpenAPI#39194
chore: migrate roles.list endpoint to new chained API pattern with OpenAPI#39194NAME-ASHWANIYADAV wants to merge 1 commit intoRocketChat:developfrom
roles.list endpoint to new chained API pattern with OpenAPI#39194Conversation
|
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: 62620f3 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 infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
📜 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 (8)📓 Common learnings📚 Learning: 2026-02-24T19:09:09.561ZApplied to files:
📚 Learning: 2026-02-25T20:10:16.987ZApplied to files:
📚 Learning: 2025-11-04T16:49:19.107ZApplied to files:
📚 Learning: 2026-02-24T19:09:01.522ZApplied to files:
📚 Learning: 2026-02-23T17:53:06.802ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
🧬 Code graph analysis (1)apps/meteor/app/api/server/v1/roles.ts (2)
🔇 Additional comments (5)
WalkthroughMigrates the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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
roles.listREST API endpoint from the legacyAPI.v1.addRoutepattern to the new chainedAPI.v1.get()pattern with AJV response schema validation and OpenAPI documentation support.Closes #39193
Endpoints migrated
roles.listaddRoute.get()Architectural changes
API.v1.addRoute('roles.list', ...)with the new chainedAPI.v1.get('roles.list', ...)method$ref: '#/components/schemas/IRole'for Swagger documentation401: validateUnauthorizedErrorResponsefor unauthorized access handlingExtractRoutesFromAPI+declare modulefor automatic type inference (matching pattern used by e2e.ts, permissions.ts, invites.ts)/v1/roles.listtyping fromrest-typingsRolesEndpoints (now inferred from API registration via module augmentation)roles.getUsersInPublicRolesendpoint withsuccessfield,required,additionalProperties: false, and401error responseFiles changed
Related project
This continues the REST API migration effort described in the GSoC 2026 project: Replace old REST API definitions over the new API.
cc @diego-sampaio @ggazzo
Summary by CodeRabbit