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.

api-docs: Improve rendering of create channel python example.

Lauryn Menard910ca975abf0
diff --git a/zerver/openapi/python_examples.py b/zerver/openapi/python_examples.py
index b837ab35e1e..5c486b99f72 100644
--- a/zerver/openapi/python_examples.py
+++ b/zerver/openapi/python_examples.py
@@ -1907,12 +1907,17 @@ def update_user_group_members(client: Client, user_group_id: int) -> None:
@openapi_test_function("/channels/create:post")
def add_channel(client: Client) -> None:
# {code_example|start}
+ # Create a new channel.
request = {
"name": "music_group",
"description": "Channel for discussing and learning about music.",
- "subscribers": [],
+ "subscribers": [12],
}
- result = client.call_endpoint(url="channels/create", method="POST", request=request)
+ result = client.call_endpoint(
+ url="channels/create",
+ method="POST",
+ request=request,
+ )
# {code_example|end}
assert_success_response(result)
validate_against_openapi_schema(result, "/channels/create", "post", "200")