But still run into issues like resource not found.
In my case, there are multiple rest resources and providers. So I just appended the swagger dependencies to those. I do see "ResteasyDeployment Adding singleton resource ... from Application javax.ws.rs.core.Application" in the logs. But when I access the url for api-docs, get the 'Could not find resource ' exception.
Here are the snippets from my web.xml:
<context-param>
<param-name>resteasy.resources</param-name>
<param-value>com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON </param-value>
</context-param>
<context-param>
<param-name>resteasy.providers</param-name>
<param-value>com.wordnik.swagger.jaxrs.listing.ApiDeclarationProvider,com.wordnik.swagger.jaxrs.listing.ResourceListingProvider</param-value>
</context-param>
<context-param>
<param-name>javax.ws.rs.core.Application</param-name>
<param-value>com.xx.yy.MyApplication</param-value>
</context-param>
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/api-docs</param-value>
</context-param>
<servlet>
<servlet-name>DefaultJaxrsConfig</servlet-name>
<servlet-class>com.wordnik.swagger.jaxrs.config.DefaultJaxrsConfig</servlet-class>
<init-param>
<param-name>api.version</param-name>
<param-value>v1</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
One thing I clearly see missing from the Jersey example is the following. What is the resteasy equivalent of this? How do I convey to resteasy to scan particular set of resources(not all of them) for the purpose of generating documentation and how do I access the documentation(url) in this particular example?
<filter>
<filter-name>jersey</filter-name>
<filter-class>com.sun.jersey.spi.container.servlet.ServletContainer</filter-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.xx.yy;com.wordnik.swagger.jersey.listing</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>jersey</filter-name>
<url-pattern>/xx/*</url-pattern>
<url-pattern>/api-docs</url-pattern>
</filter-mapping>
Any help is greatly appreciated.