diff --git a/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/webmvc/api/OpenApiResource.java b/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/webmvc/api/OpenApiResource.java index 0a92124c3..408148a0d 100644 --- a/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/webmvc/api/OpenApiResource.java +++ b/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/webmvc/api/OpenApiResource.java @@ -168,7 +168,8 @@ && isPathToMatch(operationPath)) { } } } - routerFunctionProvider.flatMap(RouterFunctionProvider::getWebMvcRouterFunctionPaths).ifPresent(routerBeans -> routerBeans.forEach(this::getRouterFunctionPaths)); + routerFunctionProvider.ifPresent(routerFunctions -> routerFunctions.getWebMvcRouterFunctionPaths() + .ifPresent(routerBeans -> routerBeans.forEach(this::getRouterFunctionPaths))); }