Skip to content
Open
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
2 changes: 1 addition & 1 deletion swagger_ui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def yaml_to_html(request):
if hasattr(settings, 'SWAGGER_YAML_FILE'):
file = open(settings.SWAGGER_YAML_FILE)
spec = yaml.load(file.read())
spec = yaml.load(file.read(), Loader=yaml.FullLoader)
return render(request, template_name="swagger_base.html", context={'data': json.dumps(spec)})
else:
raise ImproperlyConfigured('You should define SWAGGER_YAML_FILE in your settings')