CXF REST APIs Documentation using Swagger
Asked Answered
S

2

12

According to Swagger's tutorial, seems swagger only support Jersey framework (See https://github.com/wordnik/swagger-core/wiki/java-jax-rs)

Does anybody have experience on making swagger work with CXF JAX-RS implementation? Could you share your suggestions here?

Saccharify answered 18/9, 2012 at 6:51 Comment(4)
I'd be interested in hearing the answer. Have you found out anything?Television
I believe this will be useful.Yahiya
Thanks Lekkie, swagger provided sample for cxf.Saccharify
I tried to access the link, but it no longer exists. I am having the same issue in creating cxf rest with swagger2feature :(Tillfourd
F
1

Yes, it is possible to use Swagger with CXF JAX-RS implementation using swagger-jaxrs_2.10 module.

Using Swagger in CXF environment require some specific configuration that can be done via Spring application context.

Here is a good tutorial and example of such configuration.

Flanna answered 18/9, 2012 at 6:51 Comment(1)
The links are both defunct.Bonita
B
-1

Yes, It is possible to use swagger with Apache CXF. Below is the swagger usage in my working API.

@GET
    @Path("/version")
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(value = "For paged fetches returns a version for future fetches")
    public long version(@Context HttpHeaders headers) {
        return ABC.version();
    }
Botanomancy answered 26/11, 2014 at 11:7 Comment(1)
Great, maybe you could show us how you did the integration?Bonita

© 2022 - 2024 — McMap. All rights reserved.