mirror of
https://github.com/langgenius/dify.git
synced 2026-05-12 15:58:19 +08:00
42 lines
810 B
Python
42 lines
810 B
Python
from flask import Blueprint
|
|
from flask_restx import Namespace
|
|
|
|
from libs.device_flow_security import attach_anti_framing
|
|
from libs.external_api import ExternalApi
|
|
|
|
bp = Blueprint("openapi", __name__, url_prefix="/openapi/v1")
|
|
attach_anti_framing(bp)
|
|
|
|
api = ExternalApi(
|
|
bp,
|
|
version="1.0",
|
|
title="OpenAPI",
|
|
description="User-scoped programmatic API (bearer auth)",
|
|
)
|
|
|
|
openapi_ns = Namespace("openapi", description="User-scoped operations", path="/")
|
|
|
|
from . import (
|
|
account,
|
|
app_run,
|
|
apps,
|
|
apps_permitted_external,
|
|
index,
|
|
oauth_device,
|
|
oauth_device_sso,
|
|
workspaces,
|
|
)
|
|
|
|
__all__ = [
|
|
"account",
|
|
"app_run",
|
|
"apps",
|
|
"apps_permitted_external",
|
|
"index",
|
|
"oauth_device",
|
|
"oauth_device_sso",
|
|
"workspaces",
|
|
]
|
|
|
|
api.add_namespace(openapi_ns)
|