chore: migrate groups.removeModerator endpoint to new OpenAPI pattern with AJV validations
Approval required
CO
7mo ago+64+64+01234567890123456789-25-25-01234567890123456789
Proposed Changes (including screenshots)
This PR migrates the groups.removeModerator endpoint from the legacy API.v1.addRoute pattern to the OpenAPI-compliant format using AJV schema validation, continuing the REST API migration effort.
Key Changes
- Replaced
API.v1.addRoutewith chained.post()forgroups.removeModerator. - Added explicit response schemas for 200, 400, and 401 status codes.
- Removed the manually written type from
packages/rest-typings/src/v1/groups.tssince it is now auto-generated viaExtractRoutesFromAPI. - Added a changeset file.
- Business logic remains unchanged.
Swagger UI
The endpoint is documented in Swagger UI at:
/api-docs/
Test Case
This follows the same migration pattern established in:
https://github.com/RocketChat/Rocket.Chat-Open-API/pull/150
Summary by CodeRabbit
-
Refactor
- Modernized the groups.removeModerator API surface to a grouped, OpenAPI-style route with clearer auth, request/response schemas, and standardized validation for more consistent behavior.
-
Chores
- Cleaned up public REST typings by removing deprecated/duplicate entries and aligning the exported API surface with the updated endpoints.