-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support defining custom endpoint in plugin (#3703)
#### What type of PR is this? /kind feature /area core /area plugin #### What this PR does / why we need it: Including CustomEndpoint beans while building plugin router functions. After that, we can define a CustomEndpoint in plugin like this: ```java @component public class ApplicationEndpoint implements CustomEndpoint { @OverRide public RouterFunction<ServerResponse> endpoint() { return SpringdocRouteBuilder.route() .GET("/applications", request -> ServerResponse.ok().build(), builder -> { builder.operationId("ListV1Alpha1Applications"); }) .build(); } @OverRide public GroupVersion groupVersion() { return CustomEndpoint.super.groupVersion(); } } ``` #### Which issue(s) this PR fixes: Fixes #3700 #### Does this PR introduce a user-facing change? ```release-note None ```
- Loading branch information
Showing
3 changed files
with
67 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters