-
-
Notifications
You must be signed in to change notification settings - Fork 538
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Currently, when the last RequestPredicate of a RouterFunction is not a PathPatternPredicate, the RouterFunction is ignored by Springdoc (detected with Webflux).
To Reproduce
Use SpringDocApp150Test after removing the empty string pattern for the get-users
GET
operation.
IE replace :
Line 55 in 1b1e652
.GET("", HANDLER_FUNCTION, builder -> builder.operationId("get-users")) |
with the following line :
.GET(HANDLER_FUNCTION, builder -> builder.operationId("get-users"))
Current result : the get-users
route is then missing from the resulting API documentation
Expected behavior
The RouterFunction should be present in the API documentation even in that usecase.
Additional context
- As workaround, we can specify an empty string PathPatternPredicate as last RequestPredicate like on the test used to reproduce.
- I think the current behavior is due to AbstractRouterFunctionVisitor. I think that part of the logic present in the following
if
block of code (i.e. calls to createRouterFunctionData method) should be moved to commonRoute method (it will not be easy) :
Line 118 in 1b1e652
if (currentRouterFunctionDatas != null) {
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working