Which version of swagger-core do you use? What URL do you use to access your API?
The swagger.json? From: <[email protected]> on behalf of Dali <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Tuesday, 27 December 2016 at 10:16 To: Swagger <[email protected]> Subject: Can't get swagger.json Hello, I tried to integrate swagger on java + embedded jetty project but i can't get swagger.json file. I'm always getting 404 not found error on any path combination. I think swagger is not scanning my packages !?! Main.java public class ApiServer { public static void main(String[] args) throws Exception { BeanConfig beanConfig = new BeanConfig(); beanConfig.setVersion("1.0.0"); beanConfig.setResourcePackage("my.resources.packages"); beanConfig.setScan(true); beanConfig.setBasePath("/"); beanConfig.setPrettyPrint(true); Server server = new Server(Env.SERVER_PORT); ServletHolder jerseyServletHolder = new ServletHolder(new ServletContainer()); jerseyServletHolder.setInitParameter(ServerProperties.PROVIDER_PACKAGES,"my.resources.packages;com.fasterxml.jackson.jaxrs.json"); jerseyServletHolder.setInitParameter(ServerProperties.WADL_FEATURE_DISABLE, ServletContextHandler handler = new ServletContextHandler(server, "/"); "true"); handler.addServlet(jerseyServletHolder, Env.API_PREFIX); server.start(); server.join(); } @ApplicationPath("/") public class Application extends ResourceConfig { public Application() { // Register all resources present under the package. packages("my.resources.packages"); packages("com.fasterxml.jackson.jaxrs.json"); register(JacksonFeature.class); register(ApiListingResource.class); register(SwaggerSerializers.class); } } I'm using jersey 2.22 and swagger 1.5. My API classes (and swagger annotations) are under my.resources.packages My Api calls works All help appreciated Regards, Dali p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #777777} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #4e9072} p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3933ff} span.s1 {color: #000000} span.s2 {color: #3933ff} span.s3 {color: #931a68} -- 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 [email protected]. 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
