Files

12 lines
337 B
Python
Raw Permalink Normal View History

2022-11-16 15:50:08 -05:00
from os import path
from flask import Blueprint, current_app, send_file
2023-08-29 14:54:30 -07:00
docs = Blueprint("docs", __name__, url_prefix="/docs")
2022-11-16 15:50:08 -05:00
2022-11-18 12:39:50 -05:00
2023-08-29 14:54:30 -07:00
@docs.route("/openapi.yml", methods=["GET"])
2022-11-16 15:50:08 -05:00
def send_openapi():
2023-08-29 14:54:30 -07:00
openapi_schema = path.join(current_app.root_path, "../docs/openapi.yml")
return send_file(openapi_schema, mimetype="text/yaml"), 200