diff options
author | Benjamin Tissoires <benjamin.tissoires@gmail.com> | 2020-06-17 05:37:15 +0200 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@gmail.com> | 2020-06-17 05:40:38 +0200 |
commit | e1ffe943c836d511a6e445d532c3927d0a8f6cf2 (patch) | |
tree | d31af9f7049b1020b9fe92e895642e6c9b5050a8 | |
parent | 431d884e8371dfbce6d151493044ffcd2a92d10d (diff) | |
download | wekan-e1ffe943c836d511a6e445d532c3927d0a8f6cf2.tar.gz wekan-e1ffe943c836d511a6e445d532c3927d0a8f6cf2.tar.bz2 wekan-e1ffe943c836d511a6e445d532c3927d0a8f6cf2.zip |
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.
-rw-r--r-- | openapi/generate_openapi.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openapi/generate_openapi.py b/openapi/generate_openapi.py index b843feff..fabf3819 100644 --- a/openapi/generate_openapi.py +++ b/openapi/generate_openapi.py @@ -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) |