openapi: also consider Object type as valid

Not sure if this will end up in a correct openapi file, but the docs
are correctly generated, so... meh.
This commit is contained in:
Benjamin Tissoires 2020-06-17 05:37:15 +02:00
parent 431d884e83
commit e1ffe943c8

View file

@ -249,7 +249,10 @@ class EntryPoint(object):
if name.startswith('{'):
param_type = name.strip('{}')
if param_type not in ['string', 'number', 'boolean', 'integer', 'array', 'file']:
if param_type == 'Object':
# hope for the best
param_type = 'object'
elif param_type not in ['string', 'number', 'boolean', 'integer', 'array', 'file']:
self.warn('unknown type {}\n allowed values: string, number, boolean, integer, array, file'.format(param_type))
try:
name, desc = desc.split(maxsplit=1)