Skip to content

chore: migrate removeInvite/:_id endpoint to chained API pattern with AJV validation#39200

Open
NAME-ASHWANIYADAV wants to merge 3 commits intoRocketChat:developfrom
NAME-ASHWANIYADAV:chore/migrate-removeInvite-openapi
Open

chore: migrate removeInvite/:_id endpoint to chained API pattern with AJV validation#39200
NAME-ASHWANIYADAV wants to merge 3 commits intoRocketChat:developfrom
NAME-ASHWANIYADAV:chore/migrate-removeInvite-openapi

Conversation

@NAME-ASHWANIYADAV
Copy link
Contributor

@NAME-ASHWANIYADAV NAME-ASHWANIYADAV commented Feb 28, 2026

Closes #39199

Changes

  • Migrated removeInvite/:_id DELETE endpoint from legacy API.v1.addRoute to the new chained .delete() API pattern
  • Added AJV response schema validation for the 200 response
  • Removed manual '/v1/removeInvite/:_id' type definition from rest-typings (now auto-inferred via ExtractRoutesFromAPI)

Files Changed

  • apps/meteor/app/api/server/v1/invites.ts — endpoint migration
  • packages/rest-typings/src/v1/invites.ts — removed manual type definition

No behavioral changes

The endpoint logic remains identical — only the registration pattern has been updated.

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

  • API Changes

    • The removeInvite endpoint type definition was removed from the public API surface.
  • Internal Improvements

    • Invite endpoint implementation structure and route declaration were reorganized (no change to runtime behavior).

@NAME-ASHWANIYADAV NAME-ASHWANIYADAV requested review from a team as code owners February 28, 2026 19:01
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 28, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Feb 28, 2026

⚠️ No Changeset found

Latest commit: 7cb0714

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 650aaa6a-8469-49ed-b6ec-b70513d202f3

📥 Commits

Reviewing files that changed from the base of the PR and between a7207d4 and 3da4b4d.

📒 Files selected for processing (1)
  • apps/meteor/app/api/server/v1/invites.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/app/api/server/v1/invites.ts
📜 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)
  • GitHub Check: cubic · AI code reviewer

Walkthrough

Migrates the removeInvite endpoint from the deprecated API.v1.addRoute pattern to the new chained .delete() API pattern with AJV validation schema support. Removes the corresponding type declaration from the public API typings.

Changes

Cohort / File(s) Summary
API Route Migration
apps/meteor/app/api/server/v1/invites.ts
Replaces legacy API.v1.addRoute with chained .delete() pattern for removeInvite/:_id endpoint. Adds response schema validation for 200 status returning boolean, maintains auth requirement and handler logic.
Type Declaration Removal
packages/rest-typings/src/v1/invites.ts
Removes the '/v1/removeInvite/:_id': { DELETE: () => boolean; }; type declaration from the InvitesEndpoints interface.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: migrating the removeInvite endpoint from legacy API pattern to chained pattern with AJV validation, which aligns with the changeset.
Linked Issues check ✅ Passed The PR successfully addresses all requirements from issue #39199: migrates the removeInvite endpoint to chained .delete() pattern, adds AJV response validation, and removes the manual type definition from rest-typings.
Out of Scope Changes check ✅ Passed All changes are directly related to the migration objective; modifications to invites.ts endpoint implementation and removal of the manual type definition from rest-typings are both in-scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

removeInvite/:_id endpoint still uses legacy addRoute pattern

1 participant