refactor(api): update roles REST endpoints to typed TypeBox validateParams#39213
Open
Harshit2405-2004 wants to merge 8 commits intoRocketChat:developfrom
Open
refactor(api): update roles REST endpoints to typed TypeBox validateParams#39213Harshit2405-2004 wants to merge 8 commits intoRocketChat:developfrom
Harshit2405-2004 wants to merge 8 commits intoRocketChat:developfrom
Conversation
…ent newline absorptions
Contributor
|
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 |
Contributor
There was a problem hiding this comment.
2 issues found across 8 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".changeset/refactor-roles-rest-typing.md">
<violation number="1" location=".changeset/refactor-roles-rest-typing.md:9">
P2: Changeset files must have a single YAML frontmatter block at the top. This file has a second frontmatter block for `meteor`, which will be treated as markdown and the `meteor` bump will be ignored.</violation>
</file>
<file name="apps/meteor/app/api/server/v1/roles.ts">
<violation number="1" location="apps/meteor/app/api/server/v1/roles.ts:4">
P2: `roles.getUsersInRole` was likely missed in the TypeBox `validateParams` migration: the validator `isRolesGetUsersInRoleProps` is imported but never assigned to `validateParams`, leaving query params unvalidated and the import unused.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
ggazzo
reviewed
Mar 2, 2026
ggazzo
reviewed
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Currently, in \�pps/meteor/app/api/server/v1/roles.ts, the legacy endpoints map custom syntax validation bounds inside the execution block instead of relying on the native REST typings map parameter \�alidateParams.
This PR officially migrates the following endpoints mapped to @rocket.chat/rest-typings\ TypeBox bounds, effectively completing their domain migration to exact the GSoC Replace Old REST API Definition goals:
oles.addUserToRole`n-
oles.getUsersInRole`n-
oles.delete`n-
oles.removeUserFromRole`n-
oles.sync`n
(Also exposed the missing runtime validation interface schema \isRoleSyncProps\ inside
est-typings)
Checklist