Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
dbd7ec9
refactor(api): migrate chat.delete to typed endpoint with response sc…
ggazzo Mar 23, 2026
3ba0208
refactor(api): migrate chat.syncMessages to typed endpoint with respo…
ggazzo Mar 23, 2026
ab80b64
refactor(api): migrate chat.getMessage to typed endpoint with respons…
ggazzo Mar 23, 2026
2a90012
refactor(api): migrate chat.postMessage to typed endpoint with respon…
ggazzo Mar 23, 2026
170192c
refactor(api): migrate chat.search to typed endpoint with response sc…
ggazzo Mar 23, 2026
b49ef9b
refactor(api): migrate chat.sendMessage to typed endpoint with respon…
ggazzo Mar 23, 2026
2b68621
refactor(api): migrate chat.ignoreUser to typed endpoint with respons…
ggazzo Mar 23, 2026
2e98fce
refactor(api): migrate chat.getDeletedMessages to typed endpoint with…
ggazzo Mar 23, 2026
7d2ed6a
refactor(api): migrate chat.getPinnedMessages to typed endpoint with …
ggazzo Mar 23, 2026
5e21f63
refactor(api): migrate chat.getThreadsList to typed endpoint with res…
ggazzo Mar 23, 2026
86b3aa1
refactor(api): migrate chat.syncThreadsList to typed endpoint with re…
ggazzo Mar 23, 2026
e2ace6a
refactor(api): migrate chat.getThreadMessages to typed endpoint with …
ggazzo Mar 23, 2026
a159d39
refactor(api): migrate chat.syncThreadMessages to typed endpoint with…
ggazzo Mar 23, 2026
87b467e
refactor(api): migrate chat.getMentionedMessages to typed endpoint wi…
ggazzo Mar 23, 2026
9d91af8
refactor(api): migrate chat.getStarredMessages to typed endpoint with…
ggazzo Mar 23, 2026
1a72de3
refactor(api): migrate chat.getDiscussions to typed endpoint with res…
ggazzo Mar 23, 2026
eea56d1
refactor(api): migrate chat.getURLPreview to typed endpoint with resp…
ggazzo Mar 23, 2026
92761b2
refactor(api): migrate im.messages.others, im.list, im.list.everyone …
ggazzo Mar 23, 2026
693c99d
fix(tests): update errorType assertions for migrated chat endpoints
ggazzo Mar 23, 2026
8cf1d86
fix(tests): revert errorType for POST endpoints with body validators
ggazzo Mar 23, 2026
74eb925
fix(core-typings): make author_link optional in MessageQuoteAttachmen…
ggazzo Mar 24, 2026
a1e52c9
fix(core-typings): fix MessageAttachment oneOf discrimination for quo…
ggazzo Mar 24, 2026
8637608
fix(core-typings): add attachments field to MessageAttachmentDefault
ggazzo Mar 24, 2026
568c879
fix(core-typings): add content field to MessageAttachmentDefault
ggazzo Mar 24, 2026
5d9b1db
fix(autotranslate): remove unnecessary TypeScript error suppression f…
ggazzo Mar 24, 2026
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 apps/meteor/app/api/server/ajv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ import { ajv, ajvQuery } from '@rocket.chat/rest-typings';

const components = schemas.components?.schemas;
if (components) {
// Patch MessageAttachmentDefault to reject unknown properties so the oneOf
// discriminator works correctly (otherwise it matches every attachment).
const mad = components.MessageAttachmentDefault;
if (mad && typeof mad === 'object' && 'type' in mad) {
(mad as Record<string, unknown>).additionalProperties = false;
}

for (const key in components) {
if (Object.prototype.hasOwnProperty.call(components, key)) {
const uri = `#/components/schemas/${key}`;
Expand Down
Loading
Loading