wordnik/swagger-java-sample-app — Issue #10: Guice - don't get any resources.json
Author: YA2O
Created: 2012-02-02 09:39:34+00:00
State: open

Hi,

We don't have any web.xml in our project. We user Guice servlets instead... It works nice, but I cannot make Swagger
work... Here is an extract of my servletModule:

@Override
protected void configureServlets()
{

Map servletParams = new HashMap();

servletParams.put("com.sun.jersey.config.property.packages", "se.hitta.service.geo.resources");
servletParams.put("com.sun.jersey.spi.container.ContainerRequestFilters", com.sun.jersey.api.container.filter.PostReplaceFilter");
servletParams.put("com.sun.jersey.api.json.POJOMappingFeature", "true");
servletParams.put("api.version", "0.1");
servletParams.put("swagger.verson", "1.0");
servletParams.put("swagger.api.basepath", "http://localhost:8080/service-3.3.7-SNAPSHOT");
servletParams.put("swagger.security.filter", "se.service.jaxrs.guice.ApiAuthorizationFilterImpl");

serve("/*").with(GuiceContainer.class, this.servletParams);
}

My service works fine, but I do not get any resources.json at http://localhost:8080/service-3.3.7-SNAPSHOT/resources.json