Description:
In packages/rest-typings/src/v1/rooms.ts, two inconsistencies exist between the TypeScript types and their corresponding AJV schemas in RoomsCreateDiscussionSchema and membersOrderedByRoleRolePropsSchema.
Expected Behavior
RoomsCreateDiscussionSchema should include the topic field to match the RoomsCreateDiscussionProps TypeScript type so clients sending topic have it correctly passed through.
membersOrderedByRoleRolePropsSchema should have type: 'object' at the root level, consistent with all other schemas in the file, so AJV correctly rejects non-object inputs.
Current Behavior
// topic declared in type but missing from schema
type RoomsCreateDiscussionProps = {
...
topic?: string; // exists in type
};
const RoomsCreateDiscussionSchema = {
type: 'object',
properties: {
...
reply: { type: 'string', nullable: true },
// topic missing here — silently stripped by additionalProperties: false
},
required: ['prid', 't_name'],
additionalProperties: false,
};
// missing type: 'object' at root
const membersOrderedByRoleRolePropsSchema = {
// missing type: 'object'
properties: { ... },
oneOf: [{ required: ['roomId'] }, { required: ['roomName'] }],
additionalProperties: false,
};
Steps to Reproduce
See packages/rest-typings/src/v1/rooms.ts
Additional Context
- Every other schema in the file has
type: 'object' at the root making the omission a clear inconsistency
additionalProperties: false actively strips topic from every request silently with no error
- Both fixes are purely additive with no runtime behavior changes for any valid existing client
Description:
In
packages/rest-typings/src/v1/rooms.ts, two inconsistencies exist between the TypeScript types and their corresponding AJV schemas inRoomsCreateDiscussionSchemaandmembersOrderedByRoleRolePropsSchema.Expected Behavior
RoomsCreateDiscussionSchemashould include thetopicfield to match theRoomsCreateDiscussionPropsTypeScript type so clients sendingtopichave it correctly passed through.membersOrderedByRoleRolePropsSchemashould havetype: 'object'at the root level, consistent with all other schemas in the file, so AJV correctly rejects non-object inputs.Current Behavior
Steps to Reproduce
See
packages/rest-typings/src/v1/rooms.tsAdditional Context
type: 'object'at the root making the omission a clear inconsistencyadditionalProperties: falseactively stripstopicfrom every request silently with no error