@midwayjs/swagger 3.20.6-beta.1 → 3.20.6-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/swaggerExplorer.js
CHANGED
|
@@ -225,7 +225,11 @@ let SwaggerExplorer = class SwaggerExplorer {
|
|
|
225
225
|
return item.key === constants_1.DECORATORS.API_EXCLUDE_SECURITY;
|
|
226
226
|
});
|
|
227
227
|
// 如果存在安全信息,则将其添加到路径中
|
|
228
|
-
if (
|
|
228
|
+
if (excludeSecurity) {
|
|
229
|
+
// 显式设置为空数组,覆盖全局 security
|
|
230
|
+
paths[url][webRouter.requestMethod].security = [];
|
|
231
|
+
}
|
|
232
|
+
else if (security.length > 0) {
|
|
229
233
|
if (!paths[url][webRouter.requestMethod].security) {
|
|
230
234
|
paths[url][webRouter.requestMethod].security = [];
|
|
231
235
|
}
|