Skip to content

Commit

Permalink
Validate if the referenced schema has divider
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacfi committed Jun 24, 2019
1 parent bf9c17e commit bdcfd33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flasgger/utils.py
Expand Up @@ -363,7 +363,9 @@ def validate(
file_ref_path = os.path.dirname(sys.argv[0])+main_def['$ref']
with open(file_ref_path) as file:
file_content = file.read()
comment_index = file_content.index('---')+3
comment_index = file_content.rfind('---')
if comment_index > 0:
comment_index = comment_index + 3
main_def = yaml.safe_load(
(file_content[comment_index:]).replace('\n', '\n '))
main_def['definitions'] = definitions
Expand Down

0 comments on commit bdcfd33

Please sign in to comment.