Deepjyoti Dutta
Deepjyoti Dutta

Reputation: 261

Are there any advantages of using/migrating to springdoc-openapi from Springfox?

For enabling Swagger in SpringBoot 2.7 what are the advantages/disadvantages of choosing springdoc-openapi over Springfox

Upvotes: 24

Views: 20287

Answers (2)

Girts Strazdins
Girts Strazdins

Reputation: 938

As João Dias has correctly pointed out, Springfox is not maintained.

As a result of that, Springfox libraries don't work with Spring Boot 3.0.x. It is unclear who is going to fix it and whether it will be fixed at all.

At the moment (January 2023) it seems that the developer of a Spring Boot 3.0.x application willing to generate OpenAPI-compliant docs with Swagger is left with two options: a) Switch back to Spring Boot 2.7 and use Springfox for Swagger b) Choose Springdoc over Springfox

Upvotes: 9

João Dias
João Dias

Reputation: 17500

This might be considered opinion-based, but actually there are facts supporting the usage of springdoc over Springfox. Some of them:

  • springdoc is a much more recent library that does not have so much legacy code as Springfox.
  • As a consequence of the first one, springdoc is actually updated regularly and the amount of open issues is relatively small (only 11 vs 270 on Springfox).
  • It simply works easily and without major issues in the most recent Spring Boot versions.
  • Springfox seems abandoned, to say the least.

At least this is my view.

Upvotes: 48

Related Questions