Merge pull request #4918 from bentiss/fix-docs

openapi: also ignores ThrowStatement
This commit is contained in:
Lauri Ojansivu 2023-05-09 17:27:23 +03:00 committed by GitHub
commit 4790d31ff7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,11 +67,9 @@ def get_req_body_elems(obj, elems):
get_req_body_elems(obj.right, elems)
elif obj.type in ('ReturnStatement', 'UnaryExpression'):
get_req_body_elems(obj.argument, elems)
elif obj.type == 'Literal':
pass
elif obj.type == 'Identifier':
return obj.name
elif obj.type == 'FunctionDeclaration':
elif obj.type in ['Literal', 'FunctionDeclaration', 'ThrowStatement']:
pass
else:
print(obj)