You may want to consider using the Swagger Editor at swagger.io to generate a server and then look at the pom.xml. If you are using the wordnik plugin and annotations in code, it generates the doc under the target folder I believe. Not sure how this ties into CXF feature.
Chris Riley, Manager HKM Consulting LLC [email protected] (o) 774-357-5900 (m) 508-273-3102 (f) 774-357-5905 > On Jun 3, 2016, at 4:14 PM, Sergey Beryozkin <[email protected]> wrote: > > Hi > > All it does it ensures that Swagger JSON or YAML doc is available to the > clients (browsers, etc). > Swagger UI is one such client - it can show Swagger JSON (which is what > SwaggerFeature -> Swagger Core/JAX-RS produces) nicely formatted. As I said > please do check the demo poms on how to get Swagger UI installed. > > It does take few tries indeed with setting UI but it is not what > SwaggerFeature can help with, I recall spending a bit of time while trying > the demos too. Try the demo first... > > Aki, Andriy, can Swagger2Feature do something to make it simpler to plug in > UI ? I guess it is unlikely it can download it itself, etc. > > Cheers, Sergey > >> On 03/06/16 20:04, javaworkinggirl wrote: >> I still can't get swagger2Feature to work in my project >> >> What is the expected outcome of Swagger2Feature? I am expecting that I am >> going to see swagger documents for my api under http://0.0.0.0:8877/api, but >> the logs say 404 not found. >> >> Can someone explain more what is happening behind the scenes on >> Swagger2Feature? >> Any recommendations? Thx. >> >> Here's the config I am using in applicationContext.xml: >> >> <bean id="swagger2Feature" >> class="org.apache.cxf.jaxrs.swagger.Swagger2Feature"> >> <property name="basePath" value="/api"/> >> </bean> >> >> >> >> <jaxrs:server id="ecpWebServices" >> basePackages="com.twc.ctg.ecp.service.rest.custom" >> address="http://0.0.0.0:8877" depends-on="activeMQConnectionFactory"> >> <jaxrs:inInterceptors> >> <ref bean="validationInInterceptor"/> >> </jaxrs:inInterceptors> >> <jaxrs:outInterceptors> >> <ref bean="validationOutInterceptor"/> >> </jaxrs:outInterceptors> >> <jaxrs:serviceBeans> >> <ref bean="ecpAdminRestServiceV1"/> >> <ref bean="ecpApplicationRestServiceV1"/> >> <ref bean="ecpEntitlementRestServiceV2"/> >> <ref bean="ecpTvodRestServiceV1"/> >> <ref bean="ecpHouseholdHistoryRestServiceV1"/> >> <ref bean="ecpPromotionRestServiceV1"/> >> <ref bean="ecpTvodPromotionServiceV1"/> >> <ref bean="ecpFeatureRestServiceV1"/> >> <ref bean="ecpPpvServiceV1"/> >> </jaxrs:serviceBeans> >> <jaxrs:providers> >> <bean >> class="com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider"/> >> <bean >> class="org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter"/> >> <ref bean="genericRestExceptionMapper"/> >> <ref bean="customValidationExceptionMapper"/> >> </jaxrs:providers> >> <jaxrs:features> >> <ref bean="swagger2Feature" /> >> </jaxrs:features> >> </jaxrs:server> >> >> >> >> -- >> View this message in context: >> http://cxf.547215.n5.nabble.com/Swagger2Feature-jar-and-version-tp5769165p5769278.html >> Sent from the cxf-user mailing list archive at Nabble.com. > > > -- > Sergey Beryozkin > > Talend Community Coders > http://coders.talend.com/
