Skip to content

Conversation

jonasws
Copy link

@jonasws jonasws commented May 6, 2021

This PR adds a DSL matching that of org.springframework.web.reactive.function.server.RouterFunctionDsl to allow users to define operations inline when using functional routes, like (imports omitted for brevity):

@Configuration
class RouterConfig {
    @Bean
    fun appRouter(clientHandler: ClientHandler) = docRouter {
        GET(
            "/clients//{clientName}",
            clientHandler::getClientByName
        ) {
            it.beanClass(ClientService::class.java).beanMethod("getClient")
                .parameter(Builder.parameterBuilder().name("clientName"))
        }
    }
}

This has been adressed earlier as well, in #967

Copy link
Collaborator

@bnasslahsen bnasslahsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jonasws for your contribution.

@bnasslahsen bnasslahsen merged commit 800bd8d into springdoc:master May 17, 2021
@bnasslahsen bnasslahsen added the enhancement New feature or request label Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants