diff --git a/templates/zerver/api/update-notification-settings.md b/templates/zerver/api/update-notification-settings.md index ce406407b5..8fef463f2b 100644 --- a/templates/zerver/api/update-notification-settings.md +++ b/templates/zerver/api/update-notification-settings.md @@ -14,21 +14,8 @@ per-stream notification settings. {generate_code_example(python)|/settings/notifications:patch|example} {tab|curl} -``` curl -curl -X PATCH {{ api_url }}/v1/settings/notifications \ - -u BOT_EMAIL_ADDRESS:BOT_API_KEY \ - -d "enable_stream_desktop_notifications=true" \ - -d "enable_stream_email_notifications=true" \ - -d "enable_stream_push_notifications=true" \ - -d "enable_stream_sounds=true" \ - -d "enable_desktop_notifications=true" \ - -d "enable_sounds=true" \ - -d "enable_offline_email_notifications=true" \ - -d "enable_offline_push_notifications=true" \ - -d "enable_online_push_notifications=true" \ - -d "enable_digest_emails=true" \ - -d "message_content_in_email_notifications=true" -``` + +{generate_code_example(curl, include=["enable_offline_push_notifications", "enable_online_push_notifications"])|/settings/notifications:patch|example} {end_tabs} diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index 4d6666115f..f073dcce28 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -782,6 +782,7 @@ markdown_docs_length_exclude = { "templates/zerver/api/incoming-webhooks-walkthrough.md", # This macro has a long indented URL "templates/zerver/help/include/git-webhook-url-with-branches-indented.md", + "templates/zerver/api/update-notification-settings.md", # These two are the same file and have some too-long lines for GitHub badges "README.md", "docs/overview/readme.md", diff --git a/zerver/openapi/test_curl_examples.py b/zerver/openapi/test_curl_examples.py index 9c881f9d6d..c2f6550808 100644 --- a/zerver/openapi/test_curl_examples.py +++ b/zerver/openapi/test_curl_examples.py @@ -36,6 +36,7 @@ exclude_list = [ 'remove-linkifiers.md', # Endpoint does not accept bot requests 'get-user-groups.md', + 'update-notification-settings.md', # Example files do not exist 'upload-custom-emoji.md', 'upload-file.md', diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml index 9553a934cc..901653840d 100644 --- a/zerver/openapi/zulip.yaml +++ b/zerver/openapi/zulip.yaml @@ -2185,6 +2185,7 @@ paths: description: Notification sound name. schema: type: string + format: json example: ding - name: enable_desktop_notifications in: query