2023-09-26 20:54:40 +00:00
|
|
|
from flask import redirect, url_for
|
|
|
|
from flask.views import MethodView
|
|
|
|
|
2023-10-02 13:29:19 +00:00
|
|
|
from models.interface import OpenAPIGet
|
2023-09-26 20:54:40 +00:00
|
|
|
from . import routes as blp
|
|
|
|
|
|
|
|
@blp.route("/openapi")
|
|
|
|
class ApiVersion(MethodView):
|
|
|
|
@blp.doc(summary="Get the OpenAPI spec as a JSON.")
|
|
|
|
@blp.response(200, OpenAPIGet, description="Successful operation")
|
|
|
|
def get(self):
|
|
|
|
return redirect(url_for('api-docs.openapi_json'))
|