chore: 纳入本地 Dify 1.19.0 源码及品牌与免登改动
演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
60158935f4
commit
6519682885
15831 files changed
+3063428
No files matched your search
@@ -0,0 +1,33 @@
|
||||
"""Unauthenticated health and version probes for the OpenAPI surface."""
|
||||
|
||||
from flask_restx import Resource
|
||||
|
||||
from configs import dify_config
|
||||
from controllers.openapi import openapi_ns
|
||||
from controllers.openapi._catalog import CATALOG_ROUTE, catalog_response
|
||||
from controllers.openapi._contract import returns
|
||||
from controllers.openapi._models import HealthResponse, ServerVersionResponse
|
||||
|
||||
|
||||
@openapi_ns.route("/_health")
|
||||
class HealthApi(Resource):
|
||||
@returns(200, HealthResponse, description="Health check")
|
||||
def get(self):
|
||||
return HealthResponse(ok=True)
|
||||
|
||||
|
||||
@openapi_ns.route("/_version")
|
||||
class VersionApi(Resource):
|
||||
@returns(200, ServerVersionResponse, description="Server version")
|
||||
def get(self):
|
||||
return ServerVersionResponse(
|
||||
version=dify_config.project.version,
|
||||
edition=dify_config.DEPLOYMENT_EDITION,
|
||||
)
|
||||
|
||||
|
||||
@openapi_ns.route(CATALOG_ROUTE)
|
||||
class CatalogApi(Resource):
|
||||
@openapi_ns.doc("catalog", description="Machine-readable catalog of every op on this surface")
|
||||
def get(self):
|
||||
return catalog_response()
|
||||
Reference in new issue
Block a user