zulip/zerver/openapi
Lauryn Menard 31daef7f79 response: Remove "result: partially_completed" for success responses.
In feature levels 153 and 154, a new value of "partially_completed"
for `result` in a success (HTTP status code 200) was added for two
endpoints that process messages in batches: /api/delete-topic and
/api/mark-all-as-read.

Prior to these changes, `result` was either "success" or "error" for
all responses, which was a useful API invariant to have for clients.

So, here we remove "partially_completed" as a potential value for
"result" in a response. And instead, for the two endpoints noted
above, we return a boolean field "complete" to indicate if the
response successfully deleted/marked as read all the targeted
messages (complete: true) or if only some of the targeted messages
were processed (complete: false).

The "code" field for an error string that was also returned as part
of a partially completed response is removed in these changes as
well.

The web app does not currently use the /api/mark-all-as-read
endpoint, but it does use the /api/delete-topic endpoint, so these
changes update that to check the `complete` boolean instead of the
string value for `result`.
2023-09-18 13:18:24 -07:00
..
__init__.py openapi: Add missing __init__.py; fix type errors hidden by its absence. 2021-07-05 12:20:39 -07:00
curl_param_value_generators.py openapi: Pass required arguments to select_related call. 2023-08-10 17:35:43 -07:00
javascript_examples.js message-type: Add support for "direct" as value for type parameter. 2023-04-18 12:29:33 -07:00
javascript_examples.py python: Replace universal_newlines with text. 2022-01-23 22:16:01 -08:00
markdown_extension.py ruff: Fix PERF401 Use a list comprehension to create a transformed list. 2023-08-07 17:23:55 -07:00
openapi.py response: Remove "result: partially_completed" for success responses. 2023-09-18 13:18:24 -07:00
python_examples.py linkifier: Support reordering linkifiers. 2023-08-14 15:21:48 -07:00
test_curl_examples.py ruff: Fix PERF401 Use a list comprehension to create a transformed list. 2023-08-07 17:23:55 -07:00
testing.yaml test_openapi: Make testing.yml a full conformant specification. 2022-01-13 14:34:11 -08:00
zulip.yaml response: Remove "result: partially_completed" for success responses. 2023-09-18 13:18:24 -07:00