mirror of https://github.com/zulip/zulip.git
apidocs: Modify curl examples in templates.
Now, all possible configurations for curl examples are rendered directly from openapi data, and the templates should just call the markdown function once. This commit adjusts all the templates by removing hardcoded configurations and descriptions for individual curl examples.
This commit is contained in:
parent
246262fb57
commit
a2be9a0e2d
|
@ -13,7 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, exclude=["emoji_code","reaction_type"])|/messages/{message_id}/reactions:post|example}
|
||||
{generate_code_example(curl)|/messages/{message_id}/reactions:post|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ a queue for you.
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=["queue_id", "last_event_id"])|/events:get|example}
|
||||
{generate_code_example(curl)|/events:get|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, exclude=["client_gravatar", "apply_markdown", "use_first_unread_anchor"])|/messages:get|example}
|
||||
{generate_code_example(curl)|/messages:get|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -13,12 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=[""])|/streams:get|example}
|
||||
|
||||
You may pass in one or more of the parameters mentioned above
|
||||
as URL query parameters, like so:
|
||||
|
||||
{generate_code_example(curl, include=["include_public"])|/streams:get|example}
|
||||
{generate_code_example(curl)|/streams:get|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=[""])|/users/me/subscriptions:get|example}
|
||||
|
||||
You may pass the `include_subscribers` query parameter as follows:
|
||||
|
||||
{generate_code_example(curl)|/users/me/subscriptions:get|example}
|
||||
|
||||
{end_tabs}
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=[""])|/users/{email}:get|example}
|
||||
|
||||
You may pass the `client_gravatar` or `include_custom_profile_fields` query parameter as follows:
|
||||
|
||||
{generate_code_example(curl)|/users/{email}:get|example}
|
||||
|
||||
{end_tabs}
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=[""])|/users/{user_id}:get|example}
|
||||
|
||||
You may pass the `client_gravatar` or `include_custom_profile_fields` query parameter as follows:
|
||||
|
||||
{generate_code_example(curl)|/users/{user_id}:get|example}
|
||||
|
||||
{end_tabs}
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=[""])|/users:get|example}
|
||||
|
||||
You may pass the `client_gravatar` query parameter as follows:
|
||||
|
||||
{generate_code_example(curl)|/users:get|example}
|
||||
|
||||
{end_tabs}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, exclude=["stream_id"])|/users/me/subscriptions/muted_topics:patch|example}
|
||||
{generate_code_example(curl)|/users/me/subscriptions/muted_topics:patch|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ potentially messy races, etc.
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=["event_types"])|/register:post|example}
|
||||
{generate_code_example(curl)|/register:post|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, exclude=["emoji_code", "reaction_type"])|/messages/{message_id}/reactions:delete|example}
|
||||
{generate_code_example(curl)|/messages/{message_id}/reactions:delete|example}
|
||||
|
||||
|
||||
{end_tabs}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, exclude=["topic"])|/typing:post|example}
|
||||
{generate_code_example(curl)|/typing:post|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -13,12 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=["subscriptions"])|/users/me/subscriptions:post|example}
|
||||
|
||||
To subscribe another user to a stream, you may pass in
|
||||
the `principals` parameter, like so:
|
||||
|
||||
{generate_code_example(curl, include=["subscriptions", "principals"])|/users/me/subscriptions:post|example}
|
||||
{generate_code_example(curl)|/users/me/subscriptions:post|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -13,15 +13,8 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=["subscriptions"])|/users/me/subscriptions:delete|example}
|
||||
|
||||
You may specify the `principals` parameter like so:
|
||||
|
||||
{generate_code_example(curl)|/users/me/subscriptions:delete|example}
|
||||
|
||||
**Note**: Unsubscribing another user from a stream requires
|
||||
administrative privileges.
|
||||
|
||||
{end_tabs}
|
||||
|
||||
## Parameters
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=["left_side_userlist", "emojiset"])|/settings/display:patch|example}
|
||||
{generate_code_example(curl)|/settings/display:patch|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, exclude=["stream_id"])|/messages/{message_id}:patch|example}
|
||||
{generate_code_example(curl)|/messages/{message_id}:patch|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=["enable_offline_push_notifications", "enable_online_push_notifications"])|/settings/notifications:patch|example}
|
||||
{generate_code_example(curl)|/settings/notifications:patch|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, include=["new_name", "description", "is_private"])|/streams/{stream_id}:patch|example}
|
||||
{generate_code_example(curl)|/streams/{stream_id}:patch|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
{tab|curl}
|
||||
|
||||
{generate_code_example(curl, exclude=["delete"])|/user_groups/{user_group_id}/members:post|example}
|
||||
{generate_code_example(curl)|/user_groups/{user_group_id}/members:post|example}
|
||||
|
||||
{end_tabs}
|
||||
|
||||
|
|
Loading…
Reference in New Issue