How do you export the swagger intent?
Btw. The interceptors property will not work but you can add the logging
Feature to the swagger intent service.
Christian
On 06.04.2017 12:45, nino martinez wael wrote:
Im having issue getting swagger to pickup my jaxrs endpoints... CXF picks
them up..
here a short sample:
@Path("/")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Component(immediate = true, name = "SimpleEndPointsImpl", //
property
= //
{ //
"service.exported.intents=swagger",
"service.exported.interfaces=*",
"service.exported.configs=org.apache.cxf.rs",
"org.apache.cxf.rs.address=/dialer/v1/",
"org.apache.cxf.rs.in.interceptors=org.apache.cxf.interceptor.LoggingInInterceptor",
"org.apache.cxf.rs.in.interceptors=org.apache.cxf.interceptor.LoggingOutInterceptor"
})
public class SimpleEndPointsImpl implements SimpleEndPoints {
private BusinessService businessService;
private static org.slf4j.Logger logger =
LoggerFactory.getLogger(BackendDaoServiceUtil.class);
/**
* @return Gives a full list of campaigns in the system
*/
@Path("/fullcampaigns")
@GET
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Override
public List<FullCampaign> getAllCampaignsStatus() throws
CiscoAPIException, FailedSecurityException {
return businessService.getFullCampaigns();
}
On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
[email protected]> wrote:
I will test it now..
On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
[email protected]> wrote:
The Swagger integration provides a feature. So adding this should be
quite similar to adding the Jackson provider.
You create an intent service like this:
https://github.com/apache/cxf-dosgi/blob/master/samples/rest
/impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
t/impl/JacksonIntent.java
and add it to the service:
https://github.com/apache/cxf-dosgi/blob/master/samples/rest
/impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
t/impl/TaskResourceImpl.java#L36
Can you test this and give Feedback if it works.
I also thought about supporting the @Features annotation on DOSGi
service to provide a simple way to add features that do not need
additional config.
Christian
On 06.04.2017 08:04, nino martinez wael wrote:
Hi Guys
I've been contemplating on documentation. Currently we've gone down the
offline documentation road, using enunciate[1] while it feels okay I've
seen that CXF supports other directions natively[2]. I am wondering if
its
possible to use those with DOSGI?
[1]http://enunciate.webcohesion.com/
[2]http://cxf.apache.org/docs/swagger2feature.html
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
--
Best regards / Med venlig hilsen
Nino Martinez
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com