docs: openapi schema updates for chat marking

This commit is contained in:
Julian Lam
2023-02-06 16:01:40 -05:00
parent b79627a8ed
commit fb54c7e8c0
2 changed files with 52 additions and 0 deletions

View File

@@ -150,6 +150,8 @@ paths:
$ref: 'write/chats.yaml'
/chats/{roomId}:
$ref: 'write/chats/roomId.yaml'
/chats/{roomId}/state:
$ref: 'write/chats/roomId/state.yaml'
/chats/{roomId}/users:
$ref: 'write/chats/roomId/users.yaml'
/chats/{roomId}/users/{uid}:

View File

@@ -0,0 +1,50 @@
put:
tags:
- chats
summary: mark chat room as unread
description: This operation marks a chat room as unread.
parameters:
- in: path
name: roomId
schema:
type: number
required: true
description: a valid room id
example: 1
responses:
'200':
description: Chat room marked
content:
application/json:
schema:
type: object
properties:
status:
$ref: ../../../components/schemas/Status.yaml#/Status
response:
$ref: ../../../components/schemas/Chats.yaml#/RoomObjectFull
delete:
tags:
- chats
summary: mark chat room as read
description: This operation marks a chat room as read.
parameters:
- in: path
name: roomId
schema:
type: number
required: true
description: a valid room id
example: 1
responses:
'200':
description: Chat room marked
content:
application/json:
schema:
type: object
properties:
status:
$ref: ../../../components/schemas/Status.yaml#/Status
response:
$ref: ../../../components/schemas/Chats.yaml#/RoomObjectFull