chore: migrate users.getStatus endpoint to new OpenAPI pattern with AJV validation
Closed
YA
6mo ago+51+51+01234567890123456789-41-41-01234567890123456789
Proposed changes
Migrates the users.getStatus REST API endpoint from the legacy API.v1.addRoute pattern to the new chained API.v1.get() pattern with AJV response schema validation and OpenAPI documentation support.
Closes #34983
Endpoints migrated
| Endpoint | Method | Old Pattern | New Pattern |
|---|---|---|---|
users.getStatus | GET | addRoute.get() | .get() chained |
Architectural changes
- Replaced legacy
API.v1.addRoute('users.getStatus', ...)with the new chained.get('users.getStatus', ...)method - Added AJV response schema for 200 response with
status,_id, andconnectionStatusfields - Added
401: validateUnauthorizedErrorResponsefor unauthorized access handling - Wired up
ExtractRoutesFromAPI+declare modulefor automatic type inference - Removed manual
/v1/users.getStatustyping fromrest-typings(now inferred via module augmentation)
Files changed
apps/meteor/app/api/server/v1/users.ts— Main migrationpackages/rest-typings/src/v1/users.ts— Removed old manual typing
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
This PR is part of the ongoing REST API migration effort tracked in RocketChat/Rocket.Chat-Open-API#150
Summary by CodeRabbit
-
Refactor
- Consolidated users.getStatus into a single, modernized GET route with stronger response validation.
- When requesting your own status, responses may include both status and connectionStatus.
- Endpoint requires authentication.
-
Documentation
- OpenAPI documentation for users.getStatus updated.
-
Chores
- Release entry and package patch updates included.