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 <javascript:>> on behalf of Dali <
> moh...@fifty-five.com <javascript:>>
> *Reply-To: *"swagger-sw...@googlegroups.com <javascript:>" <
> swagger-sw...@googlegroups.com <javascript:>>
> *Date: *Tuesday, 27 December 2016 at 10:16
> *To: *Swagger <swagger-sw...@googlegroups.com <javascript:>>
> *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 swagger-swaggersocket+unsubscr...@googlegroups.com <javascript:>.
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to