Skip to content

Commit

Permalink
Fill operation ID while building setup route (#6857)
Browse files Browse the repository at this point in the history
#### 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
```
  • Loading branch information
JohnNiang authored Oct 13, 2024
1 parent 5848868 commit 7c6a8e9
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ RouterFunction<ServerResponse> setupPageRouter() {
.implementation(Void.class)
)
)
.before(HaloUtils.noCache(), builder -> {
})
.before(HaloUtils.noCache(), builder -> builder.operationId("SetNoCacheForSetUpPage"))
.build();
}

Expand Down

0 comments on commit 7c6a8e9

Please sign in to comment.