Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Swagger UI: what is difference between io.swagger, io.springfox, and com.mangofactory

I am working on integrating the swagger UI with a spring boot MVC app and I am curious as to the differences between these libraries.

I looked at each on mvnrepository.com and they are all done by different groups but seem to do the same thing. I am hoping to get a clear idea of the differences between these and if one is recommended over the others. I notice the swagger-core module by io.swagger has the most usages.

Thanks!

like image 245
Sakib Avatar asked Mar 07 '16 02:03

Sakib


People also ask

What is io Springfox?

io. springfox is Springfox Swagger2, wherein swagger comes integrated with Spring. com. mangofactory is swagger integrated with Spring Web MVC framework. To understand differences between Spring Web MVC framework and spring, you can read this: what is the difference between Spring and Spring MVC framework.

What is swagger Springfox?

Springfox is a framework that acts as the “glue” between Swagger and Spring. It generates the specification (contract) based on your code and also deploys the Swagger UI client with your application, allowing you to immediately test your REST API.

Where is my Swagger UI URL?

Once your application is started, you can go to http://localhost:8080/q/swagger-ui and play with your API. You can visualize your API's operations and schemas.


1 Answers

Here is an explanation of the different libraries.

Springfox is in a sense v2 of the swagger library that used to be packaged as mangofactory. What happened was we transitioned from using a private repo to creating a github organization so support development as a team.

In short mangofactory evolved into springfox which supports 2.0 version of swagger spec (in addition to 1.2). To be clear springfox and its predecessor supports spring mvc.

io.swagger is the mother ship if you will. It has great support for spring and jax-rs. So if you're looking for support for Jax-rs based services using spring or otherwise that's a great option.

like image 108
Dilip Krishnan Avatar answered Sep 19 '22 05:09

Dilip Krishnan