Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/silent-pianos-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/core-typings": patch
"@rocket.chat/rest-typings": patch
---

Add OpenAPI support for the Rocket.Chat channels ( create, list, list.joined, info) endpoints by migrating to a modern chained route definition syntax and utilizing shared AJV schemas for validation to enhance API documentation and ensure type safety through response validation.
4 changes: 2 additions & 2 deletions apps/meteor/app/api/server/definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type UnauthorizedResult<T> = {
statusCode: 401;
body: {
success: false;
error: T | 'unauthorized';
error?: T | string; // 'unauthorized' is the default error message
};
};

Expand All @@ -52,7 +52,7 @@ export type ForbiddenResult<T> = {
body: {
success: false;
// TODO: MAJOR remove 'unauthorized'
error: T | 'forbidden' | 'unauthorized';
error?: T | string; // 'forbidden' is the default error message
};
};

Expand Down
Loading
Loading