Files
zulip/templates/zerver/api/get-message-history.md
Suyash Vardhan Mathur 5f07c06040 openapi: Auto render response descriptions.
This commit modifies the templates to
auto-generate general descriptions of
responses directly from the newly
added field of x-response-description
as a part of the goal of a common template.
2021-06-22 10:58:43 -07:00

1.4 KiB

{generate_api_title(/messages/{message_id}/history:get)}

{generate_api_description(/messages/{message_id}/history:get)}

Usage examples

{start_tabs} {tab|python}

{generate_code_example(python)|/messages/{message_id}/history:get|example}

{generate_code_example(javascript)|/messages/{message_id}/history:get|example}

{tab|curl}

{generate_code_example(curl)|/messages/{message_id}/history:get|example}

{end_tabs}

Parameters

{generate_api_arguments_table|zulip.yaml|/messages/{message_id}/history:get}

{generate_parameter_description(/messages/{message_id}/history:get)}

Response

{generate_return_values_table|zulip.yaml|/messages/{message_id}/history:get}

Please note that the original message's snapshot only contains the fields topic, content, rendered_content, timestamp and user_id. This snapshot will be the only one present if the message has never been edited.

Also note that if a message's content was edited (but not the topic) or the topic was edited (but not the content), the snapshot object will only contain data for the modified fields (e.g. if only the topic was edited, prev_content, prev_rendered_content, and content_html_diff will not appear).

{generate_response_description(/messages/{message_id}/history:get)}

Example response

{generate_code_example|/messages/{message_id}/history:get|fixture(200)}

{generate_code_example|/messages/{message_id}/history:get|fixture(400)}