Reputation: 8838
There are Springfox implementation of the Swagger 2 specification and Swagger Maven Plugin. What's the difference between them? When should I prefer one over another?
Upvotes: 3
Views: 2741
Reputation: 291
The most obvious difference I see is that SpringFox doesn't require you to manually swagger-annotate classes as swagger-maven-plugin does.
The second one is the swagger spec generation time:
compilation time vs build phase, respectively.
SpringFox
Without any handwritten documentation, it can generate a lot of information about your API just by inspecting classes in your application.
Swagger-maven-plugin
Enables your Swagger-annotated project to generate Swagger artifacts during the maven build phase. It generates the spec as a build artifact to be used in downstream Swagger tooling.
Upvotes: 1
Reputation: 22158
Swagger maven plugin generates the swagger specification from Java annotations.
Springfox generates a whole web-based UI from Java annotations, with documentation, samples and functionality to try the operations out.
Upvotes: 2