-------------------------------------------- On Wed, 12/28/16, Dali <[email protected]> wrote:
Subject: Re: Can't get swagger.json To: "Swagger" <[email protected]> Date: Wednesday, December 28, 2016, 3:23 PM 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: <swagger-sw...@ googlegroups.com> on behalf of Dali <[email protected]> Reply-To: "swagger-sw...@ googlegroups.com" <swagger-sw...@ googlegroups.com> Date: Tuesday, 27 December 2016 at 10:16 To: Swagger <swagger-sw...@ googlegroups.com> 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.javapublic 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(tru e); Server server = new Server(Env.SERVER_PORT); ServletHolder jerseyServletHolder = new ServletHolder(new ServletContainer()); jerseyServletHolder.setInitPa rameter(ServerProperties.PROVI DER_PACKAGES,"my.resources. packages;com.fasterxml. jackson.jaxrs.json"); jerseyServletHolder.setInitPa rameter(ServerProperties.WADL_ FEATURE_DISABLE, ServletContextHandler handler = new ServletContextHandler(server, "/"); "true"); handler.addServlet(jerseyServ letHolder, 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.cl ass); register(SwaggerSerializers.cl ass); }} I'm using jersey 2.22 and swagger 1.5.My API classes (and swagger annotations) are under my.resources.packagesMy 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 swagger-swaggersocket+ [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. lte amenintari sub presiunea celorlalte puteri garante Poarta a acceptat oficial o data cu Austria in a 3-a sedinta a Conferintei de la Paris 25 august 7 septembrie sa recunoasca la randul ei dubla alegere. Detensionarea situatiei atat in relatiile cu Imperiul Otoman cat si cu cel Habsburgic il determina pe domn sa ordone inchiderea taberei de la Floresti \ 1 septembrie 1859 . -- 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.
