mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
bugdown: Cast enum elements to string in APIArgumentsTablePreprocessor.
So that enums other than of type string gets rendered without any error.
This commit is contained in:
@@ -118,7 +118,7 @@ class APIArgumentsTablePreprocessor(Preprocessor):
|
|||||||
for argument in arguments:
|
for argument in arguments:
|
||||||
description = argument['description']
|
description = argument['description']
|
||||||
|
|
||||||
oneof = ['`' + item + '`'
|
oneof = ['`' + str(item) + '`'
|
||||||
for item in argument.get('schema', {}).get('enum', [])]
|
for item in argument.get('schema', {}).get('enum', [])]
|
||||||
if oneof:
|
if oneof:
|
||||||
description += '\nMust be one of: {}.'.format(', '.join(oneof))
|
description += '\nMust be one of: {}.'.format(', '.join(oneof))
|
||||||
|
|||||||
Reference in New Issue
Block a user