springdoc / springdoc-openapi-demos

Demo for OpenAPI 3 with spring-boot
http://springdoc.org
Apache License 2.0
493 stars 267 forks source link

GAP issue/bug : How to add openapi annotation to RouterFunctions.route() / webflux ? #17

Closed anborg closed 4 years ago

anborg commented 4 years ago

I have the below webflux implementation.

How/Where to add openapi annotation for this?

@Configuration
public class RxRouteConfig {

    @Bean
    public RouterFunction<ServerResponse> routerFunction(RxService rxService, Service service) {
        return RouterFunctions.route(
                RequestPredicates.GET("/webflux/customer/all"), rxService::getAllCustomers) //.and(accept(MediaType.APPLICATION_JSON))
                .andRoute(GET("/webflux/customer/{id}"), rxService::findCustomerById)
                .andRoute(POST("/webflux/customers/similar").and(contentType(MediaType.APPLICATION_JSON)), rxService::findCustomerLike)
                .andRoute(GET("/webflux/customer/{id}/events"), rxService::getEvents)
                ;
    }
}
bnasslahsen commented 4 years ago

Spring-weblfux with Functional Endpoints, is not yet supported. It's clearly mentionned on the welcome page:

It will be available in a future release...