title: Swagger implementation for exiting RESTAPI
body: <p>I am trying to implement Swagger API to generate API documentation for my Rest API. I have searched swagger.io website for getting started on Swagger configuration, however, failed to generate API.</p>
  
  <p>Here is my dependency in pom.xml</p>
  
  <pre><code>&lt;dependency&gt;
       &lt;dependency&gt;
          &lt;groupId&gt;io.swagger&lt;/groupId&gt;
          &lt;artifactId&gt;swagger-jaxrs&lt;/artifactId&gt;
          &lt;version&gt;1.5.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>and bean class in applicationContext.xml: </p>
  
  <pre><code>&lt;bean id="beanConfig" class="io.swagger.jaxrs.config.BeanConfig"&gt;
      &lt;property name="title" value="Swagger Sample App"/&gt;
      &lt;property name="version" value="1.0.0" /&gt;
      &lt;property name="schemes" value="http" /&gt;
      &lt;property name="host" value="localhost:8002" /&gt;
      &lt;property name="basePath" value="/api"/&gt;
      &lt;property name="resourcePackage" value="io.swagger.resources"/&gt;
      &lt;property name="scan" value="true"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>and my web.xml</p>
  
  <pre><code>&lt;servlet&gt;
          &lt;servlet-name&gt;Jersey2Config&lt;/servlet-name&gt;
          &lt;servlet-class&gt;io.swagger.jaxrs.config.DefaultJaxrsConfig&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;api.version&lt;/param-name&gt;
              &lt;param-value&gt;1.0.0&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;swagger.api.basepath&lt;/param-name&gt;
              &lt;param-value&gt;http://localhost:8080/api&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  </code></pre>
  
  <p>Here, in web.xml, I am getting error at Jersey2Config as it is looking for a servlet mapping. In Swagger.io, it was mentioned that no servlet mapping is required. Can anybody point to me right direction to create Swagger API? Thanks.</p>