Merge pull request #3889 from bentiss/fix-openapi

openapi: actually catch the error when esprima fails at parsing the file
reviewable/pr3901/r2
Lauri Ojansivu 4 years ago committed by GitHub
commit 4c29b72242
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      openapi/generate_openapi.py

@ -821,6 +821,11 @@ def parse_schemas(schemas_dir):
for filename in files:
path = os.path.join(root, filename)
context = parse_file(path)
if context is None:
# the file doesn't contain a schema (see above)
continue
program = context.program
current_schema = None

Loading…
Cancel
Save