mirror of
https://github.com/langgenius/dify.git
synced 2026-05-20 16:57:01 +08:00
New Flask blueprint at /openapi/v1/ that will host user-scoped programmatic endpoints (device flow, identity, sessions, workspaces). Ships only a smoke route GET /openapi/v1/_health for now; subsequent phases lift handlers in from service_api, console, and the orphan oauth_device_sso.py. CORS is intentionally omitted here and configured in step A.5 once the allowlist envvar lands. Plan: docs/superpowers/plans/2026-04-26-openapi-migration.md (in difyctl repo).
24 lines
463 B
Python
24 lines
463 B
Python
from flask import Blueprint
|
|
from flask_restx import Namespace
|
|
|
|
from libs.external_api import ExternalApi
|
|
|
|
bp = Blueprint("openapi", __name__, url_prefix="/openapi/v1")
|
|
|
|
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 index
|
|
|
|
__all__ = [
|
|
"index",
|
|
]
|
|
|
|
api.add_namespace(openapi_ns)
|