chore: migrate chat.followMessage and chat.unfollowMessage to OpenAPI
Merged
SE
7mo ago+108+108+012345678901234567890123456789-80-80-01234567890123456789
Proposed changes (including videos or screenshots)
Migrate chat.followMessage and chat.unfollowMessage endpoints to the new OpenAPI-compatible chained route definition syntax with AJV body and response validation.
Changes
apps/meteor/app/api/server/v1/chat.ts
- Defined local types and AJV schemas for
ChatFollowMessageLocalandChatUnfollowMessageLocal - Migrated
chat.followMessageandchat.unfollowMessagefromaddRoute()to chained.post()calls on thechatEndpointschain (afterchat.update) - Added response validation schemas (200, 400, 401)
packages/rest-typings/src/v1/chat.ts
- Removed
ChatFollowMessageandChatUnfollowMessagetypes, schemas, and validators - Removed both endpoints from the
ChatEndpointsinterface
.changeset/migrate-chat-follow-unfollow-message.md
- Added changeset with
minorbump for@rocket.chat/meteorand@rocket.chat/rest-typings
Issue(s)
COMM-144
Tracking: RocketChat/Rocket.Chat-Open-API#150
Swagger UI — chat.followMessage:
Swagger UI — chat.unfollowMessage:
Summary by CodeRabbit
- Refactor
- Updated chat.followMessage and chat.unfollowMessage API endpoints to OpenAPI-style routes with improved request/response validation.
- Documentation
- Added a changeset documenting version bumps and enabling OpenAPI support for the chat follow/unfollow endpoints.
Task: ARCH-2019