mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 07:20:12 +01:00
openAPI: also handle export statement in the scripts
The files are actually modules, not plain scripts, and thus we are allowed to use `export`. Without `parseModule`, the script would silently fail when parsing `export.js` and the export function will not be present.
This commit is contained in:
parent
94c1367684
commit
1eea102f26
1 changed files with 1 additions and 1 deletions
|
|
@ -678,7 +678,7 @@ def parse_schemas(schemas_dir):
|
|||
data = ''.join(f.readlines())
|
||||
try:
|
||||
# if the file failed, it's likely it doesn't contain a schema
|
||||
program = esprima.parseScript(data, options={'comment': True, 'loc': True})
|
||||
program = esprima.parseModule(data, options={'comment': True, 'loc': True})
|
||||
except:
|
||||
continue
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue