Created
June 14, 2019 10:33
-
-
Save hkaraoguz/9db1fad60cf9f940fe30b544bf1e0698 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
from quart import Blueprint, send_from_directory | |
swagger_ui = Blueprint("swagger_ui", | |
__name__, | |
static_folder='swaggerui') | |
@swagger_ui.route('/swaggerui/') | |
@swagger_ui.route('/swaggerui/<path:path>') | |
def show(path=None): | |
if path is None: | |
return send_from_directory( | |
swagger_ui._static_folder, | |
"index.html" | |
) | |
return send_from_directory( | |
swagger_ui._static_folder, | |
path | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment