From 7c6a8e9ce77fae2dc4e2ef622849110dd423a80f Mon Sep 17 00:00:00 2001 From: John Niang Date: Sun, 13 Oct 2024 22:21:14 +0800 Subject: [PATCH] Fill operation ID while building setup route (#6857) #### What type of PR is this? /kind bug /area core /milestone 2.20.x #### What this PR does / why we need it: This PR fills operation ID while building setup route to prevent errors when generating OpenAPI docs. ```java 2024-10-13T22:09:46.997+08:00 ERROR 68966 --- [ parallel-4] a.w.r.e.AbstractErrorWebExceptionHandler : [88654f05-3] 500 Server Error for HTTP GET "/v3/api-docs/apis_aggregated.api_v1alpha1" java.lang.IllegalStateException: You should either fill, the Operation or at least the bean class and the bean method at org.springdoc.core.fn.builders.operation.Builder.build(Builder.java:467) ~[springdoc-openapi-starter-common-2.6.0.jar:2.6.0] Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: ``` #### Does this PR introduce a user-facing change? ```release-note None ``` --- .../run/halo/app/security/preauth/SystemSetupEndpoint.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/src/main/java/run/halo/app/security/preauth/SystemSetupEndpoint.java b/application/src/main/java/run/halo/app/security/preauth/SystemSetupEndpoint.java index 5fa81998e..4e1d3c396 100644 --- a/application/src/main/java/run/halo/app/security/preauth/SystemSetupEndpoint.java +++ b/application/src/main/java/run/halo/app/security/preauth/SystemSetupEndpoint.java @@ -108,8 +108,7 @@ public class SystemSetupEndpoint { .implementation(Void.class) ) ) - .before(HaloUtils.noCache(), builder -> { - }) + .before(HaloUtils.noCache(), builder -> builder.operationId("SetNoCacheForSetUpPage")) .build(); }