mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
api_docs: Fix missing display_recipient
object in API docs.
The `display_recipient` object was not rendered in the API docs because the case where `items` key was inside `oneOf` block was not handled in the "api_return_values_table_generator.py".
This commit is contained in:
@@ -165,6 +165,14 @@ class APIReturnValuesTablePreprocessor(Preprocessor):
|
||||
# of its keys.
|
||||
if "properties" in element:
|
||||
ans += self.render_table(element["properties"], spacing + 4)
|
||||
|
||||
if "items" in element:
|
||||
if "properties" in element["items"]:
|
||||
ans += self.render_table(element["items"]["properties"], spacing + 4)
|
||||
elif "oneOf" in element["items"]: # nocoverage
|
||||
# This block is for completeness.
|
||||
ans += self.render_oneof_block(element["items"], spacing + 4)
|
||||
|
||||
if element.get("additionalProperties", False):
|
||||
additional_properties = element["additionalProperties"]
|
||||
if "description" in additional_properties:
|
||||
|
Reference in New Issue
Block a user