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

feat(swagger): Upgrade to swagger and migrate to springdocs #1198

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jasonmcintosh
Copy link
Member

@jasonmcintosh jasonmcintosh commented Jul 18, 2024

This replaces spring fox with spring docs to the latest releases.
Primary migration guide: https://springdoc.org/migrating-from-springfox.html
MOST Of the changes are done downstream in various services that need to replace springfox resources and older outdated openapi spec APIs. See: https://github.com/spinnaker/gate/pull/1813/files for an example of this change.

This can mostly be automated through the use of openrewrite (which that PR documents). See https://docs.openrewrite.org/recipes/java/springdoc/swaggertospringdoc for the details of what this rewrite recipe applies. It DID NOT handle most groovy files which require a bit more hand holding on the migration. This does clean up the dependency tree fairly nicely finally!

TO NOTE: OpenAPI was completely broken due to various library upgrades (primarily spring fox to 3.0 to fix a CVE). Per various conversations (e.g. springfox/springfox#3193 (comment)) there were attempts to try to make spring fox 3 which has some CVE fixes work with swagger & newer openapis, but it seems to be a struggle to get these to work, and the springfox no longer seems supported. See springfox/springfox#3834 for another example of "this library is dead and doesn't even work" on latest spring boot releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants