Skip to content

migrate: replace Swagger with SpringDoc for OpenAPI support#1291

Closed
ankitshokeen wants to merge 10 commits into
apache:developfrom
ankitshokeen:migrate-to-springdoc
Closed

migrate: replace Swagger with SpringDoc for OpenAPI support#1291
ankitshokeen wants to merge 10 commits into
apache:developfrom
ankitshokeen:migrate-to-springdoc

Conversation

@ankitshokeen
Copy link
Copy Markdown
Contributor

What is the purpose of the change

This PR migrates the API documentation framework from SpringFox (Swagger 2) to SpringDoc (OpenAPI 3).
SpringFox is no longer actively maintained and causes compatibility issues with newer versions of Spring Boot, while SpringDoc is actively supported and provides better integration with modern Spring applications.

Brief changelog

  • Removed SpringFox/Swagger 2 dependencies
  • Added SpringDoc OpenAPI dependencies
  • Updated Swagger configuration to use @OpenAPIDefinition, @Operation, etc.
  • Verified API docs are accessible at /swagger-ui.html (redirects to /swagger-ui/index.html)
  • Ensured compatibility with Spring Boot version 2.3.12
  • Updated relevant controller annotations for OpenAPI

Verifying this change

  • Run the project with mvn spring-boot:run
  • Access Swagger UI at http://localhost:8080/swagger-ui.html
  • Confirm that all REST endpoints are documented correctly
  • Verified integration tests pass locally
  • GitHub workflows remain unchanged as SpringDoc doesn't require additional build steps

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist.
  • Run `mvn clean compile --batch-mode -DskipTests=false -Dcheckstyle.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true to make sure basic checks pass.

@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant