mirror of https://github.com/zulip/zulip.git
api_docs: Add check for extra `additionalProperties` in return vals.
Adds a check for `additionalProperties: true` when there are no properties listed in the schema. This currently only happens in one place, but will be helpful for deduplicating text between the `register-queue` and `get-events` endpoints.
This commit is contained in:
parent
d55c137277
commit
cc712dbade
|
@ -157,6 +157,15 @@ class APIReturnValuesTablePreprocessor(Preprocessor):
|
|||
return_values[return_value]["additionalProperties"]["properties"],
|
||||
spacing + 8,
|
||||
)
|
||||
elif return_values[return_value]["additionalProperties"].get(
|
||||
"additionalProperties", False
|
||||
):
|
||||
ans += self.render_table(
|
||||
return_values[return_value]["additionalProperties"]["additionalProperties"][
|
||||
"properties"
|
||||
],
|
||||
spacing + 8,
|
||||
)
|
||||
if (
|
||||
"items" in return_values[return_value]
|
||||
and "properties" in return_values[return_value]["items"]
|
||||
|
|
Loading…
Reference in New Issue