I was referring to the dependencies that are actually downloaded (in case of conflicts and such).
Maven has a way to get a list of that as a command, I’m sure gradle has something similar. From: <[email protected]> on behalf of Dali <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Wednesday, 11 January 2017 at 6:31 To: Swagger <[email protected]> Subject: Re: Can't get swagger.json all my dependencies on my build.gradle : dependencies { compile 'org.slf4j:slf4j-api:1.7.12' compile 'org.slf4j:slf4j-jdk14:1.7.12' compile 'org.slf4j:slf4j-log4j12:1.7.12' compile 'log4j:log4j:1.2.17' compile 'org.json:json:20090211' compile 'org.codehaus.jackson:jackson-core-asl:1.9.13' compile 'com.google.guava:guava:15.0' compile 'org.glassfish.jersey.core:jersey-server:2.22.2' compile 'org.glassfish.jersey.core:jersey-client:2.22.2' compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.22.2' compile 'org.glassfish.jersey.containers:jersey-container-jetty-servlet:2.22.2' compile 'org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.22.2' compile 'org.eclipse.jetty:jetty-server:9.1.6.v20160112' compile 'org.glassfish.jersey.media:jersey-media-json-jackson:2.22.2' compile 'org.glassfish.jersey.media:jersey-media-multipart:2.22.2' compile 'javax.servlet:javax.servlet-api:3.1.0' compile 'org.apache.commons:commons-email:1.3.3' compile 'org.mongodb:mongo-java-driver:2.14.1' compile 'commons-io:commons-io:2.4' compile 'com.codahale.metrics:metrics-core:3.0.1' compile 'io.swagger:swagger-core:1.5.12' compile 'io.swagger:swagger-jaxrs:1.5.12' testCompile 'org.glassfish.jersey.test-framework:jersey-test-framework-core:2.22.2' testCompile 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:2.22.2' testCompile 'org.testng:testng:6.8.1' testCompile 'org.mockito:mockito-all:1.9.5' } On Tuesday, January 10, 2017 at 7:20:07 PM UTC+1, Ron wrote: Can you provide a full list of your dependencies? From: <[email protected]> on behalf of Dali <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Monday, 2 January 2017 at 8:31 To: Swagger <[email protected]> Subject: Re: Can't get swagger.json Here are my logs : INFO 2017-01-02 17:29:50:041 ApiDaoProvider:45 - http://localhost:5003/v1/swagger.json INFO 2017-01-02 17:29:50:043 ApiDaoProvider:49 - InstanceContextFilter Jan 02, 2017 5:29:50 PM org.eclipse.jetty.servlet.ServletHandler doHandle WARNING: javax.servlet.ServletException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489) at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:717) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:479) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:462) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.LinkedList.checkElementIndex(LinkedList.java:553) at java.util.LinkedList.get(LinkedList.java:474) at java.util.Collections$UnmodifiableList.get(Collections.java:1211) at com.fiftyfive.services.filters.InstanceContextFilter.filter(InstanceContextFilter.java:54) at org.glassfish.jersey.server.ContainerFilteringStage.apply(ContainerFilteringStage.java:132) at org.glassfish.jersey.server.ContainerFilteringStage.apply(ContainerFilteringStage.java:68) at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197) at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:318) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:267) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) ... 18 more On Thursday, December 29, 2016 at 8:17:18 PM UTC+1, Ron wrote: You’d need to check you application logs to see why you’re getting 500. You might need to bump up the log levels. From: <[email protected]> on behalf of Dali <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Thursday, 29 December 2016 at 5:59 To: Swagger <[email protected]> Subject: Re: Can't get swagger.json Thanks for the reply. I updated my build.gradle compile 'io.swagger:swagger-core:1.5.12' compile 'io.swagger:swagger-jaxrs:1.5.12' and I added the package io.swagger.jaxrs.listing here jerseyServletHolder.setInitParameter(ServerProperties.PROVIDER_PACKAGES, "com.fiftyfive.services;com.fasterxml.jackson.jaxrs.json;io.swagger.jaxrs.listing"); Now i'm getting error 500 when i try with http://localhost:5003/v1/swagger.json On Wednesday, December 28, 2016 at 6:34:59 PM UTC+1, Ron wrote: If you’re getting a 404, it doesn’t mean the scanning isn’t happening, it means Jersey doesn’t register ApiListingResource for some reason (even though it’s in your ResourceConfig). ApiListingResource is just a JAX-RS resource like your own – which should be exposed at the root of the other resources. You’re also using a really old version of swagger-core – that version has many known issues, some of which are critical. Try upgrading to the latest – 1.5.12. From: <[email protected]> on behalf of Dali <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Wednesday, 28 December 2016 at 5:23 To: Swagger <[email protected]> Subject: Re: Can't get swagger.json I'm using swagger-core 1.5.0 My API is accessible on http://localhost:5003/v1/ I think that the swagger.json is not created. I tried http://localhost:5003/v1/swagger.json or http://localhost:5003/swagger.json but it's always an 404. On Tuesday, December 27, 2016 at 7:20:59 PM UTC+1, Ron wrote: 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. -- 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. -- 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.
