openapi: Add missing user property to deprecated user settings events.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-10-22 19:23:09 -07:00 committed by Tim Abbott
parent f256a5a536
commit ce0040b69f
2 changed files with 10 additions and 3 deletions

View File

@ -67,9 +67,6 @@ from zerver.openapi.openapi import openapi_spec
# This list of exemptions represents details we should fix in Zulip's
# API structure and/or validators.
EXEMPT_OPENAPI_NAMES = [
# users field missing
"update_display_settings_event",
"update_global_notifications_event",
# Additional keys(push_users_notify) due to bug in API.
"message_event",
# tuple handling

View File

@ -257,6 +257,10 @@ paths:
- $ref: "#/components/schemas/EventTypeSchema"
- enum:
- update_display_settings
user:
type: string
description: |
The Zulip API email of the user.
setting_name:
type: string
description: |
@ -278,6 +282,7 @@ paths:
example:
{
"type": "update_display_settings",
"user": "iago@zulip.com",
"setting_name": "high_contrast_mode",
"setting": false,
"id": 0,
@ -302,6 +307,10 @@ paths:
- $ref: "#/components/schemas/EventTypeSchema"
- enum:
- update_global_notifications
user:
type: string
description: |
The Zulip API email of the user.
notification_name:
type: string
description: |
@ -317,6 +326,7 @@ paths:
example:
{
"type": "update_global_notifications",
"user": "iago@zulip.com",
"notification_name": "enable_sounds",
"setting": true,
"id": 0,