user1365697
user1365697

Reputation: 5999

What is the difference between swagger-api and JAX-RS?

What is the difference between swagger-api and JAX-RS ?

Is the swagger-api only for documentation? (for example @ApiOperation)

Upvotes: 4

Views: 3496

Answers (2)

Sampada
Sampada

Reputation: 2991

As per the API docs, JAX-RS is the Java API for RESTful Web Services that provides portable APIs for developing, exposing and accessing Web applications designed and implemented in compliance with principles of REST architectural style.

Swagger, on the other hand, comes in picture when you have implemented your restful web services using any of the JAX-RS implementations (Jersey, RestEasy, Apache-CXF, etc as already mentioned by @Bijoy). Swagger adds form to your APIs by making them look good and presentable so that client code can be written easily, at the same time it also makes documentation a much less boring task by integrating it with code. Needless to say, also saves the extra time it takes to document if done after coding is over. In this sense, it is a bit revolutionary.

Upvotes: 8

Bijoy
Bijoy

Reputation: 167

jax-rs is REST specification, and it is implemented by ones like jersey, resteasy etc, swagger is more on documenting and it has an easy interface if you want to test and make lot easier from different platform for adapt your rest functionalities

Upvotes: 3

Related Questions