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:
Vishnu KS
2019-10-07 13:48:18 +05:30
committed by Tim Abbott
parent ef876ff4c7
commit 21ab8c542a

View File

@@ -118,7 +118,7 @@ class APIArgumentsTablePreprocessor(Preprocessor):
for argument in arguments:
description = argument['description']
oneof = ['`' + item + '`'
oneof = ['`' + str(item) + '`'
for item in argument.get('schema', {}).get('enum', [])]
if oneof:
description += '\nMust be one of: {}.'.format(', '.join(oneof))