Issue with getting Swagger working with cxfrs
Issue
- We have hosted few of the rest services using camel cxfrs and now we are planning to use swagger for api doc generation.
Going by the cxfrs documentation, all we need is to addswaggerfeature bean as a cxf feature to the cxfrs endpoint.
First point which we notice is that we cannot find org.apache.cxf.jaxrs.swagger.Swagger2Feature class . Is this not available with fuse 6.1 ?
- We then moved to
SwaggerFeatureinstead and finally we end up with the following error.
Caused by: java.lang.ClassNotFoundException: com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON not found by org.apache.cxf.cxf-rt-frontend-jaxrs [182]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
- We have got swagger feature installed and we can see this class is available in fuse.
JBossFuse:karaf@root> find-class ApiListingResourceJSON
Apache ServiceMix :: Bundles :: swagger-jaxrs_2.10 (379)
com/wordnik/swagger/jaxrs/listing/ApiListingResourceJSON.class
But looks like somehow org.apache.cxf.cxf-rt-frontend-jaxrs is not able to see ApiListingResourceJSON
Environment
- Red Hat JBoss Fuse
- 6.1.x
- Apache CXF
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.