Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use yaml.safe_load in check-swagger-sources.py #3719

Merged
merged 1 commit into from
Feb 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/check-swagger-sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def check_response(filepath, request, code, response):

def check_swagger_file(filepath):
with open(filepath) as f:
swagger = yaml.load(f)
swagger = yaml.safe_load(f)

for path, path_api in swagger.get('paths', {}).items():

Expand Down Expand Up @@ -162,7 +162,7 @@ def load_file(path):
else:
# We have to assume it's YAML because some of the YAML examples
# do not have file extensions.
return yaml.load(f)
return yaml.safe_load(f)


if __name__ == '__main__':
Expand Down