From fb54c7e8c08918b8720dc5bd6d7ad0d289bfdafc Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 6 Feb 2023 16:01:40 -0500 Subject: [PATCH] docs: openapi schema updates for chat marking --- public/openapi/write.yaml | 2 + public/openapi/write/chats/roomId/state.yaml | 50 ++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 public/openapi/write/chats/roomId/state.yaml diff --git a/public/openapi/write.yaml b/public/openapi/write.yaml index 6f55dbcfc0..d68c2f45cf 100644 --- a/public/openapi/write.yaml +++ b/public/openapi/write.yaml @@ -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}: diff --git a/public/openapi/write/chats/roomId/state.yaml b/public/openapi/write/chats/roomId/state.yaml new file mode 100644 index 0000000000..4a98edcaf2 --- /dev/null +++ b/public/openapi/write/chats/roomId/state.yaml @@ -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 \ No newline at end of file