Skip to content

Provide Tests which actually use org.springdoc.kotlin.SpringdocRouterFunctionDsl #1261

Closed
@snv

Description

@snv
Contributor

I found the docRouter function and the DSL unintuitive to use (in contrast to the normal router-functions -- I will open seperate issues regarding the usage).
So i was looking to find running examples in the tests.

Surprisingly there are none, all the tests only use the RequestMapping-Annotation.

Which means org.springdoc.kotlin.SpringdocRouterFunctionDsl is basically untestet, so i'm not surprised that the example mentioned therein does not work.

Activity

bnasslahsen

bnasslahsen commented on Sep 10, 2021

@bnasslahsen
Collaborator

@snv,

SpringdocRouterFunctionDsl, will be removed...
it doesn't respect the quality requirements.

Use the code samples are available on GITHUB of demos:

And some of the project tests: (from app83 to app90) or others using RouterFunction:

added a commit that references this issue on Sep 10, 2021
cdd87d0
snv

snv commented on Sep 10, 2021

@snv
ContributorAuthor

Thanks for the pointers to the relevant examples, but i was looking for examples specifically using Functional Endpoints with kotlin.
Kotlins ability to define & use nicer DSLs makes all the difference, IMO: With the kotlin DSL i prefer Functional Endpoints, but with the java syntax the Annotated Endpoints are the more readable variant.

It's a bit sad to see that the DSL will be removed rather than enhanced.

snv

snv commented on Sep 10, 2021

@snv
ContributorAuthor

Since the SpringdocRouterFunctionDsl gets removed, what is the recommended way to use router functions with kotlin instead?

I do hope for not having to use @RouterOperation

bnasslahsen

bnasslahsen commented on Sep 10, 2021

@bnasslahsen
Collaborator

@snv,

see the samples...
You have also, the functional syntax available.

locked as too heated and limited conversation to collaborators on Sep 10, 2021
added a commit that references this issue on May 17, 2025
ba26728
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @snv@bnasslahsen

        Issue actions

          Provide Tests which actually use org.springdoc.kotlin.SpringdocRouterFunctionDsl · Issue #1261 · springdoc/springdoc-openapi