swagger-jaxrs vs swagger-jersey2-jaxrs

748 views
Skip to first unread message

satguru srivastava

unread,
Sep 12, 2015, 12:24:30 PM9/12/15
to Swagger

as per document 

(https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-JAX-RS-Project-Setup-1.5.X)


swagger-jaxrs supports JAXRS version 1.0 

whereas 

swagger-jersey2-jaxrs supports JAXRS version 2.0


Further as per document we can use the jersey2 artifact for any JAX RS implementation example RESTeasy.


Now when I check the swagger RESTeasy setup documentation 


(https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-RESTEasy-2.X-Project-Setup-1.5#adding-the-dependencies-to-your-application)


I do not see any swagger jersey2 class being used. 


So how does jax rs version 2.0 support comes in?


Ron Ratovsky

unread,
Sep 13, 2015, 3:28:28 AM9/13/15
to Swagger
The guide is for RESTEasy 2.X which supports only JAX-RS 1.X. If you're using RESTEasy 3.X, you should use the jersey2 dependency.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

satguru srivastava

unread,
Sep 15, 2015, 12:43:04 PM9/15/15
to Swagger
For RESTEasy 3.x which Jersey class would I use ?

For jersey 2 itself, the only jeresey specific class which i see being used is "io.swagger.jersey.config.JerseyJaxrsConfig" and that only if I want to configure swagger  via a Servlet.

Basically what I am trying to understand is if swagger jersey 2  can be used for any JAX RS implementation why call it swagger jersey 2 ? why not just swagger jax rs 2 ?

Ron Ratovsky

unread,
Sep 16, 2015, 10:09:59 AM9/16/15
to Swagger
Right now, swagger-jersey2-jaxrs has jersey2-specific details but also wraps the jax-rs 2 implementation. If you use any other jax-rs 2 implementation, you'd still need to use the jersey2 module. We have a pending issue to change the structure a bit so it's more generic, but for now that's what we have.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages