Skip to content

Commit e613d75

Browse files
authored
Fix viewer token response schema (#140)
## Description Fixes invalid schema. ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
1 parent 3323cbe commit e613d75

2 files changed

Lines changed: 4 additions & 21 deletions

File tree

examples/room-manager/openapi.yaml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -116,27 +116,8 @@ paths:
116116
schema:
117117
type: object
118118
properties:
119-
peerToken:
120-
type: string
121-
url:
119+
token:
122120
type: string
123-
room:
124-
type: object
125-
properties:
126-
id:
127-
type: string
128-
name:
129-
type: string
130-
peer:
131-
type: object
132-
properties:
133-
id:
134-
type: string
135-
name:
136-
type: string
137-
required:
138-
- peerToken
139-
- url
140121
"404":
141122
description: Default Response
142123
content:

examples/room-manager/src/schema.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ export const peerEndpointSchema: FastifySchema = {
5555
tags: ['room'],
5656
};
5757

58+
const viewerTokenResponse = S.object().prop('token', S.string());
59+
5860
export const viewerEndpointSchema: FastifySchema = {
5961
params: S.object().prop('roomName', S.string().required()),
6062
operationId: 'getBroadcastViewerToken',
6163
response: {
62-
200: response200,
64+
200: viewerTokenResponse,
6365
404: baseErrorResponse,
6466
},
6567
tags: ['room'],

0 commit comments

Comments
 (0)