[ https://issues.apache.org/jira/browse/CXF-6952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357123#comment-15357123 ]
Akitoshi Yoshida commented on CXF-6952: --------------------------------------- I just tried cxf-3.1.5 on both karaf-4.0.5 and karaf-3.0.6, following the instruction steps given in README.txt of samples/jax_rs/description_swagger2_osgi, which are as simple as feature:repo-add cxf 3.1.5 feature:install cxf-rs-description-swagger2 install -s mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.1.5 and after that, both swagger URLs http://localhost:8181/cxf/swaggerSample/swagger.json http://localhost:8181/cxf/swaggerSample/swagger.yaml are returning the correctly generated swagger documents. Therefore, if you can't run the sample, I suppose either you have modified at the sample app or your karaf container is not correctly set up (e.g., no access to the maven repos). > Swagger2Featue not scanning CXF resources > ----------------------------------------- > > Key: CXF-6952 > URL: https://issues.apache.org/jira/browse/CXF-6952 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 3.1.3, 3.1.5 > Environment: Windows > Reporter: Niten Aggarwal > Labels: features > > Swagger2Feature is not scanning end points configured in OSGI blueprint and > always returning default Swagger Json. > To reproduce issue, I deployed > https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi > project as well into my Karaf runtime but no luck and same default Json is > returned. > https://issues.apache.org/jira/browse/CXF-6524 > https://issues.apache.org/jira/browse/CXF-6541 > Was following above bugs and it seems with versions 3.0.6, 3.1.2 this issue > should be resolved so I tried with cxf versions 3.1.2, 3.1.3 and 3.1.5 but no > luck. > Also the samples distribution which is using 3.2.0-SNAPSHOT, also returns > default json. > Default json which I am getting.. > {"swagger":"2.0","info":{"description":"The > Application","version":"1.0.0","title":"Sample REST > Application","contact":{"name":"us...@cxf.apache.org"},"license":{"name":"Apache > 2.0 > License","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"basePath":"/cxf/swaggerSample"} > Also sample Json doesn't recognize base path and always returned at > http://localhost:8181/swaggerSample/swagger.json. > Thanks > Niten -- This message was sent by Atlassian JIRA (v6.3.4#6332)