No, I've not been able to make it work with the demo either. Eventually I
gave up and used swagger-jaxrs directly. It was pretty straightforward once
I figured out the secret sauce:
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<version>1.5.0</version>
<scope>compile</scope>
</dependency>
@Component
public class SwaggerProvider {
@Bean
public SwaggerSerializers getSwaggerWriter() {
return new SwaggerSerializers();
}
@Bean
public ApiListingResource getApiListingResource() {
return new io.swagger.jaxrs.listing.ApiListingResource();
}
@Bean
public BeanConfig getSwaggerConfig() {
// Swagger-2.0 JSON served at:
http://localhost:8080/xxx/swagger.json
BeanConfig c = new io.swagger.jaxrs.config.BeanConfig();
c.setResourcePackage("x.y.z.v1.rs");
c.setScan(true);
c.setDescription("Some description");
c.setTitle("Sometitle");
return c;
}
}
This was enough to successfully get swagger.json to be generated and made
accessible.
Now... I just have to figure out how to get the swagger UI working with
this. The "easy" integrations out there don't use CXF :)
--
View this message in context:
http://cxf.547215.n5.nabble.com/Swagger2Feature-not-finding-Api-annotations-in-interfaces-tp5771115p5771471.html
Sent from the cxf-user mailing list archive at Nabble.com.