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

SpringFox to SpringDoc - migrate Dockets #588

Open
nmck257 opened this issue Sep 5, 2024 · 2 comments
Open

SpringFox to SpringDoc - migrate Dockets #588

nmck257 opened this issue Sep 5, 2024 · 2 comments
Labels
recipe Recipe requested

Comments

@nmck257
Copy link
Collaborator

nmck257 commented Sep 5, 2024

What problem are you trying to solve?

SpringFox to SpringDoc migration guide:
https://springdoc.org/#migrating-from-springfox

This issue tracks the pending work to also migrate Docket declarations to SpringDoc replacements (OpenApi / properties / GroupedOpenApi).

Are you interested in contributing this recipe to OpenRewrite?

Maybe eventually but another person is welcome to pick it up

@nmck257 nmck257 added the recipe Recipe requested label Sep 5, 2024
@timtebeek
Copy link
Contributor

In particular I like this perhaps simpler approach

If you have only one Docket — remove it and instead add properties to your application.properties:

springdoc.packagesToScan=package1, package2
springdoc.pathsToMatch=/v1, /api/balance/**

That might be served with a ScanningRecipe that looks if there really is only a single Docket, and then adds those properties. Does that fit your typical usage there?

@nmck257
Copy link
Collaborator Author

nmck257 commented Sep 6, 2024

Yeah, I believe it was valid to use SpringFox with zero Docket beans, and in that case the existing recipes should be fine.

For one Docket bean, do exactly what you described. For multiple, refactor to GroupedOpenApi beans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Recipe requested
Projects
Status: Recipes Wanted
Development

No branches or pull requests

2 participants