I'd ask the Wordnik guys if I were you, but seems to me that their swagger support is only implemented for Jersey Servlet case.
Marek
On Oct 18, 2012, at 9:06 PM, jon_at_rollinsville.org wrote:
> I'm trying to use swagger with Jersey and notice that when I configure
> Jersey as a servlet everything works fine.
>
> When I change my configuration over such that Jersey is configured as a
> filter however I get errors like this:
>
> SEVERE: The following errors and warnings have been detected with
> resource and/or provider classes:
> SEVERE: Missing dependency for method public
> javax.ws.rs.core.Response
> com.wordnik.swagger.jaxrs.ApiListingResourceJSON.getAllApis(javax.servl
> et.ServletConfig,com.sun.jersey.api.core.ResourceConfig,javax.ws.rs.cor
> e.HttpHeaders,javax.ws.rs.core.UriInfo) at parameter at index 0
> SEVERE: Method, public javax.ws.rs.core.Response
> com.wordnik.swagger.jaxrs.ApiListingResourceJSON.getAllApis(javax.servl
> et.ServletConfig,com.sun.jersey.api.core.ResourceConfig,javax.ws.rs.cor
> e.HttpHeaders,javax.ws.rs.core.UriInfo), annotated with GET of
> resource, class com.wordnik.swagger.jaxrs.ApiListingResourceJSON, is
> not recognized as valid resource method.
> SEVERE: Missing dependency for method public
> javax.ws.rs.core.Response
> com.wordnik.swagger.jaxrs.ApiListingResourceXML.getAllApis(javax.servle
> t.ServletConfig,com.sun.jersey.api.core.ResourceConfig,javax.ws.rs.core
> .HttpHeaders,javax.ws.rs.core.UriInfo) at parameter at index 0
> SEVERE: Method, public javax.ws.rs.core.Response
> com.wordnik.swagger.jaxrs.ApiListingResourceXML.getAllApis(javax.servle
> t.ServletConfig,com.sun.jersey.api.core.ResourceConfig,javax.ws.rs.core
> .HttpHeaders,javax.ws.rs.core.UriInfo), annotated with GET of resource,
> class com.wordnik.swagger.jaxrs.ApiListingResourceXML, is not
> recognized as valid resource method.
> Oct 18, 2012 11:27:30 AM
> com.sun.jersey.spi.spring.container.servlet.SpringServlet initiate
>
> This only happens when my config includes an <init-param> for the
> filter referencing the swagger like so:
>
> <init-param>
>
> <param-name>com.sun.jersey.config.property.packages</param-name>
>
> <param-value>com.jonarcher.rest;com.wordnik.swagger.jaxrs</param-value>
> </init-param>
>
> That same <init-param> works just fine when Jersey is configured as a
> servlet.
>
> Any pointers on what's wrong? Thanks in advance.