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:
Vector73
2025-07-11 06:42:17 +00:00
committed by Tim Abbott
parent 71342169ff
commit ae9336a904

View File

@@ -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: