Skip to content

Commit

Permalink
adapt to new AJV validations
Browse files Browse the repository at this point in the history
  • Loading branch information
murtaza98 committed Jun 6, 2022
1 parent 74f1221 commit 86f2b35
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions packages/rest-typings/src/v1/voip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ const VoipRoomsSchema: JSONSchemaType<VoipRooms> = {

export const isVoipRoomsProps = ajv.compile<VoipRooms>(VoipRoomsSchema);

type VoipRoomClose = { rid: string; token: string; comment: string; tags?: string[] };
type VoipRoomClose = { rid: string; token: string; options: { comment?: string; tags?: string[] } };

const VoipRoomCloseSchema: JSONSchemaType<VoipRoomClose> = {
type: 'object',
Expand All @@ -471,18 +471,24 @@ const VoipRoomCloseSchema: JSONSchemaType<VoipRoomClose> = {
token: {
type: 'string',
},
comment: {
type: 'string',
},
tags: {
type: 'array',
items: {
type: 'string',
options: {
type: 'object',
properties: {
comment: {
type: 'string',
nullable: true,
},
tags: {
type: 'array',
items: {
type: 'string',
},
nullable: true,
},
},
nullable: true,
},
},
required: ['rid', 'token', 'comment'],
required: ['rid', 'token'],
additionalProperties: false,
};

Expand Down

0 comments on commit 86f2b35

Please sign in to comment.