mirror of https://github.com/zulip/zulip.git
openapi: Fix return values in delete-queue endpoint.
The check for whether to do the special GET /events logic was incorrectly also covering DELETE /events.
This commit is contained in:
parent
fe07f67360
commit
ad9d1c0f80
|
@ -43,15 +43,15 @@ class APIReturnValuesTablePreprocessor(Preprocessor):
|
|||
return_values: Dict[str, Any] = {}
|
||||
return_values = get_openapi_return_values(endpoint, method)
|
||||
text: List[str] = []
|
||||
if endpoint != "/events":
|
||||
text = self.render_table(return_values, 0)
|
||||
else:
|
||||
if doc_name == "/events:get":
|
||||
return_values = copy.deepcopy(return_values)
|
||||
events = return_values["events"].pop("items", None)
|
||||
text = self.render_table(return_values, 0)
|
||||
# Another heading for the events documentation
|
||||
text.append("\n\n## Events\n\n")
|
||||
text += self.render_events(events)
|
||||
else:
|
||||
text = self.render_table(return_values, 0)
|
||||
if len(text) > 0:
|
||||
text = ["#### Return values"] + text
|
||||
line_split = REGEXP.split(line, maxsplit=0)
|
||||
|
|
Loading…
Reference in New Issue