From f35d1aa92ae93c5488a97431cd0545e3ac039cff Mon Sep 17 00:00:00 2001 From: Xinkai Yi Date: Thu, 15 Jan 2026 11:54:42 +0800 Subject: [PATCH 1/8] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0django-environ?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E8=A7=A3=E5=86=B3=E9=83=A8=E7=BD=B2=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98=20--story=3D130029401?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/{{cookiecutter.project_name}}/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template/{{cookiecutter.project_name}}/requirements.txt b/template/{{cookiecutter.project_name}}/requirements.txt index 1934066..5c69a31 100644 --- a/template/{{cookiecutter.project_name}}/requirements.txt +++ b/template/{{cookiecutter.project_name}}/requirements.txt @@ -26,4 +26,5 @@ opentelemetry-proto==1.25.0 opentelemetry-sdk==1.25.0 opentelemetry-semantic-conventions==0.46b0 opentelemetry-util-http==0.46b0 -# add your custom requirements below this line \ No newline at end of file +# add your custom requirements below this line +django-environ==0.11.2 \ No newline at end of file From 6d520380320f8d6273867323a66fd05ff1294e50 Mon Sep 17 00:00:00 2001 From: Xinkai Yi Date: Thu, 15 Jan 2026 12:07:25 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=9A=84=E5=89=8D=E7=BD=AE=E9=92=A9=E5=AD=90?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E8=AE=BE=E7=BD=AE=E6=94=B9=E4=B8=BAexclude?= =?UTF-8?q?=E5=A3=B0=E6=98=8E=E7=9A=84=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bk_plugin_framework/services/bpf_service/api/detail.py | 1 + .../bk_plugin_framework/services/bpf_service/api/logs.py | 1 + .../bk_plugin_framework/services/bpf_service/api/meta.py | 1 + .../bk_plugin_framework/services/bpf_service/api/schedule.py | 1 + 4 files changed, 4 insertions(+) diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py index fc17fd0..09371e7 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py @@ -69,6 +69,7 @@ class Detail(APIView): permission_classes = [permissions.AllowAny] @extend_schema( + exclude=True, summary="获取指定版本的插件详情", operation_id="plugin_detail", responses={200: standard_response_enveloper(DetailResponseSerializer)}, diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py index fa4acc1..adaeb82 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py @@ -45,6 +45,7 @@ class Logs(APIView): permission_classes = [permissions.AllowAny] @extend_schema( + exclude=True, summary="获取插件执行日志", operation_id="plugin_logs", responses={200: standard_response_enveloper(LogsResponseSerializer)}, diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py index 2126a56..4b027dc 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py @@ -63,6 +63,7 @@ class Meta(APIView): permission_classes = [permissions.AllowAny] @extend_schema( + exclude=True, summary="获取插件元信息", operation_id="plugin_meta_info", responses={200: standard_response_enveloper(MetaResponseSerializer)}, diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py index 1d05161..031be58 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py @@ -56,6 +56,7 @@ class Schedule(APIView): permission_classes = [permissions.AllowAny] @extend_schema( + exclude=True, summary="获取插件调度详情", operation_id="plugin_schedule", parameters=[ScheduleParamsSerializer], From 6ccf920e31611e098be9c0ca9035facd88452a74 Mon Sep 17 00:00:00 2001 From: Xinkai Yi Date: Thu, 15 Jan 2026 12:08:45 +0800 Subject: [PATCH 3/8] =?UTF-8?q?Revert=20"fix:=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E7=9A=84=E5=89=8D=E7=BD=AE?= =?UTF-8?q?=E9=92=A9=E5=AD=90=E5=B1=8F=E8=94=BD=E8=AE=BE=E7=BD=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BAexclude=E5=A3=B0=E6=98=8E=E7=9A=84=E6=96=B9=E5=BC=8F"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6d520380320f8d6273867323a66fd05ff1294e50. --- .../bk_plugin_framework/services/bpf_service/api/detail.py | 1 - .../bk_plugin_framework/services/bpf_service/api/logs.py | 1 - .../bk_plugin_framework/services/bpf_service/api/meta.py | 1 - .../bk_plugin_framework/services/bpf_service/api/schedule.py | 1 - 4 files changed, 4 deletions(-) diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py index 09371e7..fc17fd0 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py @@ -69,7 +69,6 @@ class Detail(APIView): permission_classes = [permissions.AllowAny] @extend_schema( - exclude=True, summary="获取指定版本的插件详情", operation_id="plugin_detail", responses={200: standard_response_enveloper(DetailResponseSerializer)}, diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py index adaeb82..fa4acc1 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py @@ -45,7 +45,6 @@ class Logs(APIView): permission_classes = [permissions.AllowAny] @extend_schema( - exclude=True, summary="获取插件执行日志", operation_id="plugin_logs", responses={200: standard_response_enveloper(LogsResponseSerializer)}, diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py index 4b027dc..2126a56 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py @@ -63,7 +63,6 @@ class Meta(APIView): permission_classes = [permissions.AllowAny] @extend_schema( - exclude=True, summary="获取插件元信息", operation_id="plugin_meta_info", responses={200: standard_response_enveloper(MetaResponseSerializer)}, diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py index 031be58..1d05161 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py @@ -56,7 +56,6 @@ class Schedule(APIView): permission_classes = [permissions.AllowAny] @extend_schema( - exclude=True, summary="获取插件调度详情", operation_id="plugin_schedule", parameters=[ScheduleParamsSerializer], From ade91214e31e6b796d5b05df7eb0fb745a1af5a4 Mon Sep 17 00:00:00 2001 From: Xinkai Yi Date: Thu, 15 Jan 2026 12:09:58 +0800 Subject: [PATCH 4/8] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=9A=84=E5=89=8D=E7=BD=AE=E9=92=A9=E5=AD=90?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E8=AE=BE=E7=BD=AE=E6=94=B9=E4=B8=BAexclude?= =?UTF-8?q?=E5=A3=B0=E6=98=8E=E7=9A=84=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/bpf_service/api/detail.py | 1 + .../services/bpf_service/api/logs.py | 1 + .../services/bpf_service/api/meta.py | 1 + .../services/bpf_service/api/schedule.py | 1 + .../bk_plugin_runtime/config/default.py | 31 ------------------- 5 files changed, 4 insertions(+), 31 deletions(-) diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py index fc17fd0..09371e7 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/detail.py @@ -69,6 +69,7 @@ class Detail(APIView): permission_classes = [permissions.AllowAny] @extend_schema( + exclude=True, summary="获取指定版本的插件详情", operation_id="plugin_detail", responses={200: standard_response_enveloper(DetailResponseSerializer)}, diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py index fa4acc1..adaeb82 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/logs.py @@ -45,6 +45,7 @@ class Logs(APIView): permission_classes = [permissions.AllowAny] @extend_schema( + exclude=True, summary="获取插件执行日志", operation_id="plugin_logs", responses={200: standard_response_enveloper(LogsResponseSerializer)}, diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py index 2126a56..4b027dc 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/meta.py @@ -63,6 +63,7 @@ class Meta(APIView): permission_classes = [permissions.AllowAny] @extend_schema( + exclude=True, summary="获取插件元信息", operation_id="plugin_meta_info", responses={200: standard_response_enveloper(MetaResponseSerializer)}, diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py index 1d05161..031be58 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/schedule.py @@ -56,6 +56,7 @@ class Schedule(APIView): permission_classes = [permissions.AllowAny] @extend_schema( + exclude=True, summary="获取插件调度详情", operation_id="plugin_schedule", parameters=[ScheduleParamsSerializer], diff --git a/runtime/bk-plugin-runtime/bk_plugin_runtime/config/default.py b/runtime/bk-plugin-runtime/bk_plugin_runtime/config/default.py index 31111d1..e21627f 100644 --- a/runtime/bk-plugin-runtime/bk_plugin_runtime/config/default.py +++ b/runtime/bk-plugin-runtime/bk_plugin_runtime/config/default.py @@ -238,37 +238,6 @@ def logging_addition_settings(logging_dict): } -def preprocessing_filter_internal_apis(endpoints): - """ - 预处理钩子:排除不需要注册到 API 网关的内部 API - """ - # 需要排除的 API 路径模式 - excluded_patterns = [ - "/bk_plugin/detail", - "/bk_plugin/meta", - "/bk_plugin/logs", - "/bk_plugin/schedule", - ] - filtered = [] - for path, path_regex, method, callback in endpoints: - # 检查路径是否匹配排除模式 - should_exclude = any(pattern in path for pattern in excluded_patterns) - if not should_exclude: - filtered.append((path, path_regex, method, callback)) - return filtered - - -# drf_spectacular settings -SPECTACULAR_SETTINGS = { - "TITLE": "BK Plugin API", - "DESCRIPTION": "蓝鲸插件服务 API", - "VERSION": "1.0.0", - # 预处理钩子:排除内部 API - "PREPROCESSING_HOOKS": [ - "bk_plugin_runtime.config.default.preprocessing_filter_internal_apis", - ], -} - # 网关是否公开,公开则其他开发者可见/可申请权限 BK_APIGW_IS_PUBLIC = str(env.bool("BK_APIGW_IS_PUBLIC", default=True)).lower() # if BK_APIGW_IS_OFFICIAL is True, the BK_APIGW_NAME should be start with `bk-` From ae5eb81dfde3a8188692e8d32b77abad1b2306bc Mon Sep 17 00:00:00 2001 From: Xinkai Yi Date: Thu, 15 Jan 2026 12:16:02 +0800 Subject: [PATCH 5/8] =?UTF-8?q?fix:=20=E5=85=B3=E9=97=AD=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=9A=84=E7=BD=91=E5=85=B3=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=20--story=3D130029401?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bk_plugin_framework/services/bpf_service/api/callback.py | 2 +- .../bk_plugin_framework/services/bpf_service/api/invoke.py | 2 +- .../services/bpf_service/api/plugin_api_dispatch.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/callback.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/callback.py index b3c1fd5..3644465 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/callback.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/callback.py @@ -51,7 +51,7 @@ class PluginCallback(APIView): extensions=gen_apigateway_resource_config( is_public=True, allow_apply_permission=True, - user_verified_required=True, + user_verified_required=False, app_verified_required=True, resource_permission_required=True, description_en="plugin callback", diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/invoke.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/invoke.py index 1afb59f..d1c874f 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/invoke.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/invoke.py @@ -66,7 +66,7 @@ class Invoke(APIView): extensions=gen_apigateway_resource_config( is_public=True, allow_apply_permission=True, - user_verified_required=True, + user_verified_required=False, app_verified_required=True, resource_permission_required=True, description_en="Invoke specific version plugin", diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/plugin_api_dispatch.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/plugin_api_dispatch.py index 2ed6036..c040b31 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/plugin_api_dispatch.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/api/plugin_api_dispatch.py @@ -87,7 +87,7 @@ class PluginAPIDispatch(APIView): extensions=gen_apigateway_resource_config( is_public=True, allow_apply_permission=True, - user_verified_required=True, + user_verified_required=False, app_verified_required=True, resource_permission_required=True, description_en="Plugin API dispatch", From 56266a6e31d74964551b5f34e2c23ac32ee4f5f1 Mon Sep 17 00:00:00 2001 From: Xinkai Yi Date: Thu, 15 Jan 2026 12:19:33 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0django-environ?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E8=A7=A3=E5=86=B3=E9=83=A8=E7=BD=B2=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98=20--story=3D130029401?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bk_plugin_framework/services/bpf_service/urls.py | 3 --- runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py index 07c8dec..3021b07 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py @@ -23,10 +23,7 @@ urlpatterns = [ path(r"meta/", api.Meta.as_view()), path(r"detail/", api.Detail.as_view()), - path(r"invoke/", api.Invoke.as_view()), path(r"schedule/", api.Schedule.as_view()), - path(r"plugin_api_dispatch/", api.PluginAPIDispatch.as_view()), - path(r"callback//", api.PluginCallback.as_view()), ] # add log api diff --git a/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py b/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py index 032a00b..56031a2 100644 --- a/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py +++ b/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py @@ -11,11 +11,13 @@ from django.conf import settings from django.contrib import admin -from django.urls import include, re_path +from django.urls import include, path, re_path from drf_yasg import openapi from drf_yasg.views import get_schema_view from rest_framework import permissions +from bk_plugin_framework.services.bpf_service import api + schema_view = get_schema_view( openapi.Info( title="PluginService API", @@ -27,6 +29,9 @@ urlpatterns = [ + path(r"plugin_api_dispatch/", api.PluginAPIDispatch.as_view()), + path(r"callback//", api.PluginCallback.as_view()), + path(r"invoke//", api.Invoke.as_view()), re_path(r"^admin/", admin.site.urls), re_path(r"^account/", include("blueapps.account.urls")), re_path(r"^i18n/", include("django.conf.urls.i18n")), From ce9395192df3e3fcda9ec5b026e0505d6d5f7f1b Mon Sep 17 00:00:00 2001 From: Xinkai Yi Date: Thu, 15 Jan 2026 12:23:58 +0800 Subject: [PATCH 7/8] =?UTF-8?q?Revert=20"fix:=20=E6=B7=BB=E5=8A=A0django-e?= =?UTF-8?q?nviron=E4=BE=9D=E8=B5=96=E8=A7=A3=E5=86=B3=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=20--story=3D130029401"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 56266a6e31d74964551b5f34e2c23ac32ee4f5f1. --- .../bk_plugin_framework/services/bpf_service/urls.py | 3 +++ runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py index 3021b07..07c8dec 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py @@ -23,7 +23,10 @@ urlpatterns = [ path(r"meta/", api.Meta.as_view()), path(r"detail/", api.Detail.as_view()), + path(r"invoke/", api.Invoke.as_view()), path(r"schedule/", api.Schedule.as_view()), + path(r"plugin_api_dispatch/", api.PluginAPIDispatch.as_view()), + path(r"callback//", api.PluginCallback.as_view()), ] # add log api diff --git a/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py b/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py index 56031a2..032a00b 100644 --- a/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py +++ b/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py @@ -11,13 +11,11 @@ from django.conf import settings from django.contrib import admin -from django.urls import include, path, re_path +from django.urls import include, re_path from drf_yasg import openapi from drf_yasg.views import get_schema_view from rest_framework import permissions -from bk_plugin_framework.services.bpf_service import api - schema_view = get_schema_view( openapi.Info( title="PluginService API", @@ -29,9 +27,6 @@ urlpatterns = [ - path(r"plugin_api_dispatch/", api.PluginAPIDispatch.as_view()), - path(r"callback//", api.PluginCallback.as_view()), - path(r"invoke//", api.Invoke.as_view()), re_path(r"^admin/", admin.site.urls), re_path(r"^account/", include("blueapps.account.urls")), re_path(r"^i18n/", include("django.conf.urls.i18n")), From 0467d78ee956c37502534767df15c6fcda8eb613 Mon Sep 17 00:00:00 2001 From: Xinkai Yi Date: Thu, 15 Jan 2026 12:24:31 +0800 Subject: [PATCH 8/8] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B7=AF=E7=94=B1=E5=88=B0runtime=E6=A0=B9?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E4=BB=A5=E9=81=BF=E5=85=8D=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E5=88=B0=E7=BD=91=E5=85=B3=E6=B7=BB=E5=8A=A0=E6=A0=B9=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E5=89=8D=E7=BC=80=20--story=3D130029401?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bk_plugin_framework/services/bpf_service/urls.py | 3 --- runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py index 07c8dec..3021b07 100644 --- a/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py +++ b/bk-plugin-framework/bk_plugin_framework/services/bpf_service/urls.py @@ -23,10 +23,7 @@ urlpatterns = [ path(r"meta/", api.Meta.as_view()), path(r"detail/", api.Detail.as_view()), - path(r"invoke/", api.Invoke.as_view()), path(r"schedule/", api.Schedule.as_view()), - path(r"plugin_api_dispatch/", api.PluginAPIDispatch.as_view()), - path(r"callback//", api.PluginCallback.as_view()), ] # add log api diff --git a/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py b/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py index 032a00b..56031a2 100644 --- a/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py +++ b/runtime/bk-plugin-runtime/bk_plugin_runtime/urls.py @@ -11,11 +11,13 @@ from django.conf import settings from django.contrib import admin -from django.urls import include, re_path +from django.urls import include, path, re_path from drf_yasg import openapi from drf_yasg.views import get_schema_view from rest_framework import permissions +from bk_plugin_framework.services.bpf_service import api + schema_view = get_schema_view( openapi.Info( title="PluginService API", @@ -27,6 +29,9 @@ urlpatterns = [ + path(r"plugin_api_dispatch/", api.PluginAPIDispatch.as_view()), + path(r"callback//", api.PluginCallback.as_view()), + path(r"invoke//", api.Invoke.as_view()), re_path(r"^admin/", admin.site.urls), re_path(r"^account/", include("blueapps.account.urls")), re_path(r"^i18n/", include("django.conf.urls.i18n")),