diff --git a/sanic_openapi/openapi2/blueprint.py b/sanic_openapi/openapi2/blueprint.py index 8878a99..68d1f46 100644 --- a/sanic_openapi/openapi2/blueprint.py +++ b/sanic_openapi/openapi2/blueprint.py @@ -22,7 +22,7 @@ def blueprint_factory(): dir_path = abspath(dir_path + "/ui") swagger_blueprint.static( - "/", dir_path + "/index.html", strict_slashes=True + "/", dir_path + "/index.html", strict_slashes=True, name="static-index" ) swagger_blueprint.static("", dir_path) diff --git a/sanic_openapi/openapi3/blueprint.py b/sanic_openapi/openapi3/blueprint.py index 343d662..66810d4 100644 --- a/sanic_openapi/openapi3/blueprint.py +++ b/sanic_openapi/openapi3/blueprint.py @@ -19,7 +19,7 @@ def blueprint_factory(): dir_path = dirname(dirname(realpath(__file__))) dir_path = abspath(dir_path + "/ui") - oas3_blueprint.static("/", dir_path + "/index.html", strict_slashes=True) + oas3_blueprint.static("/", dir_path + "/index.html", strict_slashes=True, name="static-index") oas3_blueprint.static("", dir_path) # Redirect "/swagger" to "/swagger/"