Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

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

Anders Kaseorgce0040b69f23
diff --git a/tools/check-schemas b/tools/check-schemas
index c120243fcd0..467e5a928a4 100755
--- a/tools/check-schemas
+++ b/tools/check-schemas
@@ -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
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index d547ade1963..850bafb638c 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -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": "[email protected]",
"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": "[email protected]",
"notification_name": "enable_sounds",
"setting": true,
"id": 0,