File tree Expand file tree Collapse file tree
bk-plugin-framework/bk_plugin_framework/services/bpf_service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,6 +89,34 @@ paths:
8989 userVerifiedRequired : true
9090 appVerifiedRequired : false
9191 disabledStages : []
92+ /bk_plugin/openapi/ :
93+ x-bk-apigateway-method-any :
94+ operationId : plugin_openapi
95+ description : ' '
96+ tags : []
97+ responses :
98+ default :
99+ description : ' '
100+ x-bk-apigateway-resource :
101+ isPublic : true
102+ allowApplyPermission : true
103+ matchSubpath : true
104+ backend :
105+ type : HTTP
106+ method : any
107+ {% if settings.BK_PLUGIN_APIGW_BACKEND_SUB_PATH %}
108+ path : /{env.api_sub_path}bk_plugin/openapi/
109+ {% else %}
110+ path : /bk_plugin/openapi/
111+ {% endif %}
112+ matchSubpath : true
113+ timeout : 0
114+ upstreams : {}
115+ transformHeaders : {}
116+ authConfig :
117+ userVerifiedRequired : false
118+ appVerifiedRequired : true
119+ disabledStages : []
92120 /callback/{token}/ :
93121 post :
94122 operationId : callback
Original file line number Diff line number Diff line change 1818from bk_plugin_framework .envs import settings
1919
2020PLUGIN_API_URLS_MODULE = "bk_plugin.apis.urls"
21+ PLUGIN_OPENAPI_URLS_MODULE = "bk_plugin.openapi.urls"
2122
2223urlpatterns = [
2324 path (r"meta/" , api .Meta .as_view ()),
4041else :
4142 sys .stdout .write ("[!]plugin api urls module found\n " )
4243 urlpatterns .append (path (r"plugin_api/" , include (PLUGIN_API_URLS_MODULE )))
44+
45+ # add plugin openapi
46+ try :
47+ importlib .import_module (PLUGIN_OPENAPI_URLS_MODULE )
48+ except ModuleNotFoundError :
49+ sys .stdout .write ("[!]can not find plugin openapi urls module, skip it\n " )
50+ else :
51+ sys .stdout .write ("[!]plugin openapi urls module found\n " )
52+ urlpatterns .append (path (r"openapi/" , include (PLUGIN_OPENAPI_URLS_MODULE )))
You can’t perform that action at this time.
0 commit comments