This is an automated email from the ASF dual-hosted git repository.
feiwang pushed a commit to branch branch-1.10
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/branch-1.10 by this push:
new 1a6b520021 [KYUUBI #7219] Fix endless swagger openapi.json security
items
1a6b520021 is described below
commit 1a6b520021b8fdd50ce3edae1ea9e5cd61d99eef
Author: Wang, Fei <[email protected]>
AuthorDate: Thu Oct 2 00:07:49 2025 -0700
[KYUUBI #7219] Fix endless swagger openapi.json security items
### Why are the changes needed?
Fix endless security items increasing.
Do not use addSecurityItem api.
<img width="643" height="368" alt="image"
src="https://github.com/user-attachments/assets/97a4088b-40f8-4cd5-89f0-0e18a91c8b9c"
/>
### How was this patch tested?
Code review.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #7219 from turboFei/fix_api_spec.
Closes #7219
c10a102c7 [Wang, Fei] Fix security
Authored-by: Wang, Fei <[email protected]>
Signed-off-by: Wang, Fei <[email protected]>
(cherry picked from commit 44ce1a57571366aa85bde66684299faac4937f04)
Signed-off-by: Wang, Fei <[email protected]>
---
.../scala/org/apache/kyuubi/server/api/v1/KyuubiOpenApiResource.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/KyuubiOpenApiResource.scala
b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/KyuubiOpenApiResource.scala
index e5f52c0fe3..d6eafb6f2e 100644
---
a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/KyuubiOpenApiResource.scala
+++
b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/KyuubiOpenApiResource.scala
@@ -112,9 +112,9 @@ class KyuubiOpenApiResource extends BaseOpenApiResource
with ApiRequestContext {
.`type`(SecurityScheme.Type.HTTP)
.scheme("Bearer")
.bearerFormat("JWT")))
- .addSecurityItem(new SecurityRequirement()
+ .security(List(new SecurityRequirement()
.addList("BasicAuth")
- .addList("BearerAuth"))
+ .addList("BearerAuth")).asJava)
}
}