{"apiVersion":"1.0.2","swaggerVersion":"1.2","apis":[{"path":"/Print service"},{"path":"/user","description":"User REST for Integration Testing"}]}
Now to integrate this with the swagger UI I did the following
Copied this contents of this dist folder in the below URL
https://github.com/swagger-api/swagger-ui
and pasted it into webapp/WEB_INF folder of my directory
changed the url in the index.xml to point to my project
http://localhost:8080/tester/api-docs
now if I go and get access the URL i should be getting the Ui right?
Please let me know if I am missing anything
Regards,
Guru
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
http://localhost:8080/tester/sw/swagger.json
but all I get is a blank page please check and let me know if I have my applicationContext and Bootstrap right
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xsi:schemaLocation="
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus>
<bean id="accountService" class="com.guru.learning.apachepoc.service.BenifitService" init-method="init"/>
<bean id="jsonProvider"
class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
<jaxrs:server id="accountrs" address="/rservice">
<jaxrs:serviceBeans>
<ref bean="accountService"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean='jsonProvider' />
</jaxrs:providers>
</jaxrs:server>
<bean id="swaggerResourceJSON" class="io.swagger.jaxrs.listing.ApiListingResource" />
<bean id="swaggerSerializers" class="io.swagger.jaxrs.listing.SwaggerSerializers" />
<!--<bean id="swaggerResourceJSON" class="com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON" />-->
<!--<bean id="swaggerResourceWriter" class="com.wordnik.swagger.jaxrs.listing.ResourceListingProvider" />-->
<!--<bean id="swaggerApiWriter" class="com.wordnik.swagger.jaxrs.listing.ApiDeclarationProvider" />-->
<jaxrs:server id="swagger" address="/sw">
<jaxrs:serviceBeans>
<ref bean="accountService" />
<ref bean="swaggerResourceJSON"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="swaggerSerializers"/>
<ref bean='jsonProvider' />
<!--<ref bean="swaggerResourceWriter" />-->
<!--<ref bean="swaggerApiWriter" />-->
</jaxrs:providers>
</jaxrs:server>
</beans>
package com.guru.learning.apachepoc.config;
import io.swagger.jaxrs.config.BeanConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
/**
* Created by gnamathe on 7/30/2015.
*/
public class Bootstrap extends HttpServlet {
Logger log = LoggerFactory.getLogger(Bootstrap.class);
public void init(ServletConfig config) throws ServletException {
super.init(config);
BeanConfig beanConfig = new BeanConfig();
beanConfig.setVersion("1.0.2");
beanConfig.setBasePath("http://localhost:8080/tester/");
beanConfig.setResourcePackage("com.guru.learning.apachepoc.service");beanConfig.setScan(true);
}
}
am I missing anything here?
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.