Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
snv opened this issue Sep 10, 2021 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@snv
Copy link
Contributor

snv commented Sep 10, 2021

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.

@bnasslahsen
Copy link
Contributor

bnasslahsen commented Sep 10, 2021

@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:

@snv
Copy link
Contributor Author

snv commented Sep 10, 2021

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
Copy link
Contributor Author

snv commented Sep 10, 2021

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
Copy link
Contributor

bnasslahsen commented Sep 10, 2021

@snv,

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

@springdoc springdoc locked as too heated and limited conversation to collaborators Sep 10, 2021
@bnasslahsen bnasslahsen added the bug Something isn't working label Jan 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants