From f0b099dbc0d63ac81017dbd25b9d4015ebf46685 Mon Sep 17 00:00:00 2001 From: Vishnu Ks Date: Wed, 9 Oct 2019 10:30:12 +0000 Subject: [PATCH] docs: Make update-message-flags use curl example system. --- templates/zerver/api/update-message-flags.md | 8 +------- zerver/openapi/test_curl_examples.py | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/templates/zerver/api/update-message-flags.md b/templates/zerver/api/update-message-flags.md index 301b07f327..3ba12392ab 100644 --- a/templates/zerver/api/update-message-flags.md +++ b/templates/zerver/api/update-message-flags.md @@ -44,13 +44,7 @@ zulip(config).then((client) => { {tab|curl} -``` curl -curl -X POST {{ api_url }}/v1/messages/flags \ - -u BOT_EMAIL_ADDRESS:BOT_API_KEY \ - -d "messages=[4,8,15]" \ - -d "op=add" \ - -d "flag=starred" -``` +{generate_code_example(curl)|/messages/flags:post|example} {end_tabs} diff --git a/zerver/openapi/test_curl_examples.py b/zerver/openapi/test_curl_examples.py index adfccd657b..6c670529d8 100644 --- a/zerver/openapi/test_curl_examples.py +++ b/zerver/openapi/test_curl_examples.py @@ -24,6 +24,7 @@ exclude_list = [ 'update-message.md', 'delete-message.md', 'get-message-history.md', + 'update-message-flags.md', ] def test_generated_curl_examples_for_success(client: Client) -> None: