Can't get swagger.json

1,199 views
Skip to first unread message

Dali

unread,
Dec 27, 2016, 1:16:15 PM12/27/16
to Swagger
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

Ron Ratovsky

unread,
Dec 27, 2016, 1:20:59 PM12/27/16
to swagger-sw...@googlegroups.com

Which version of swagger-core do you use?

What URL do you use to access your API?

The swagger.json?


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-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Dali

unread,
Dec 28, 2016, 8:23:43 AM12/28/16
to Swagger
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.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

maldonado...@yahoo.com

unread,
Dec 28, 2016, 8:47:19 AM12/28/16
to swagger-sw...@googlegroups.com

--------------------------------------------
On Wed, 12/28/16, Dali <moh...@fifty-five.com> wrote:

Subject: Re: Can't get swagger.json
To: "Swagger" <swagger-sw...@googlegroups.com>
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 <moh...@fifty-five.com>
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
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+
unsub...@googlegroups.com.
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-swaggers...@googlegroups.com.

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 .

Ron Ratovsky

unread,
Dec 28, 2016, 12:34:59 PM12/28/16
to swagger-sw...@googlegroups.com

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: <swagger-sw...@googlegroups.com> on behalf of Dali <moh...@fifty-five.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Wednesday, 28 December 2016 at 5:23
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Can't get swagger.json

 

I'm using swagger-core 1.5.0

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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-swaggers...@googlegroups.com.

Dali

unread,
Dec 29, 2016, 8:59:24 AM12/29/16
to Swagger
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

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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+unsub...@googlegroups.com.

Ron Ratovsky

unread,
Dec 29, 2016, 2:17:18 PM12/29/16
to swagger-sw...@googlegroups.com

You’d need to check you application logs to see why you’re getting 500. You might need to bump up the log levels.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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-swaggers...@googlegroups.com.


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-swaggers...@googlegroups.com.

Message has been deleted

Dali

unread,
Jan 2, 2017, 11:31:25 AM1/2/17
to Swagger
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



To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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+unsub...@googlegroups.com.


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+unsub...@googlegroups.com.

calde...@yahoo.com

unread,
Jan 2, 2017, 6:51:10 PM1/2/17
to swagger-sw...@googlegroups.com

--------------------------------------------
On Mon, 1/2/17, Dali <moh...@fifty-five.com> wrote:

Subject: Re: Can't get swagger.json
To: "Swagger" <swagger-sw...@googlegroups.com>
Date: Monday, January 2, 2017, 6:31 PM
<swagger-sw...@ googlegroups.com> on
behalf of Dali <moh...@fifty-five.com>
Reply-To: "swagger-sw...@
googlegroups.com" <swagger-sw...@ googlegroups.com>
Date: Thursday, 29 December 2016 at 5:59
To: Swagger <swagger-sw...@
googlegroups.com>
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.setInitPar
ameter(ServerProperties.PROVID
ER_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:
<swagger-sw...@googlegroups. com> on
behalf of Dali <moh...@fifty-five.com>
Reply-To: "swagger-sw...@googlegroups. com"
<swagger-sw...@googlegroups.
com>
Date: Wednesday, 28 December 2016 at 5:23
To: Swagger <swagger-sw...@googlegroups. com>
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:
<swagger-sw...@googlegroups. com> on
behalf of Dali <moh...@fifty-five.com>
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
from it, send an email to swagger-swaggers...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
egociat cu M. Litvinov bazele viitorului tratat care au fost consemnate intr-un

Ron Ratovsky

unread,
Jan 10, 2017, 1:20:07 PM1/10/17
to swagger-sw...@googlegroups.com

Can you provide a full list of your dependencies?

Here are my logs :

 

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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-swaggers...@googlegroups.com.


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-swaggers...@googlegroups.com.


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-swaggers...@googlegroups.com.

diaz_car...@yahoo.com

unread,
Jan 10, 2017, 6:02:38 PM1/10/17
to swagger-sw...@googlegroups.com

--------------------------------------------
On Tue, 1/10/17, Ron Ratovsky <r...@swagger.io> wrote:

Subject: Re: Can't get swagger.json
To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Tuesday, January 10, 2017, 8:20 PM

#yiv2745527381
#yiv2745527381 --

_filtered #yiv2745527381 {font-family:Arial;panose-1:2 11 6
4 2 2 2 2 2 4;}
_filtered #yiv2745527381 {panose-1:2 7 3 9 2 2 5 2 4 4;}
_filtered #yiv2745527381 {panose-1:2 4 5 3 5 4 6 3 2 4;}
_filtered #yiv2745527381 {font-family:Calibri;panose-1:2 15
5 2 2 2 4 3 2 4;}
#yiv2745527381
#yiv2745527381 p.yiv2745527381MsoNormal, #yiv2745527381
li.yiv2745527381MsoNormal, #yiv2745527381
div.yiv2745527381MsoNormal
{margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}
#yiv2745527381 a:link, #yiv2745527381
span.yiv2745527381MsoHyperlink
{color:blue;text-decoration:underline;}
#yiv2745527381 a:visited, #yiv2745527381
span.yiv2745527381MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
#yiv2745527381 p
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}
#yiv2745527381 code
{}
#yiv2745527381 span.yiv2745527381styled-by-prettify
{}
#yiv2745527381 p.yiv2745527381p1, #yiv2745527381
li.yiv2745527381p1, #yiv2745527381 div.yiv2745527381p1
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}
#yiv2745527381 p.yiv2745527381p2, #yiv2745527381
li.yiv2745527381p2, #yiv2745527381 div.yiv2745527381p2
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}
#yiv2745527381 p.yiv2745527381p3, #yiv2745527381
li.yiv2745527381p3, #yiv2745527381 div.yiv2745527381p3
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}
#yiv2745527381 span.yiv2745527381s1
{}
#yiv2745527381 span.yiv2745527381s2
{}
#yiv2745527381 span.yiv2745527381apple-tab-span
{}
#yiv2745527381 span.yiv2745527381s3
{}
#yiv2745527381 p.yiv2745527381p4, #yiv2745527381
li.yiv2745527381p4, #yiv2745527381 div.yiv2745527381p4
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}
#yiv2745527381 span.yiv2745527381EmailStyle28
{font-family:Calibri;color:windowtext;}
#yiv2745527381 span.yiv2745527381msoIns
{text-decoration:underline;color:teal;}
#yiv2745527381 .yiv2745527381MsoChpDefault
{font-size:10.0pt;}
_filtered #yiv2745527381 {margin:72.0pt 72.0pt 72.0pt
72.0pt;}
#yiv2745527381 div.yiv2745527381WordSection1
{}
#yiv2745527381 Can you
critical.Try upgrading
to the latest – 1.5.12.  From:
<swagger-sw...@googlegroups.com>
on behalf of Dali <moh...@fifty-five.com>
Reply-To:
"swagger-sw...@googlegroups.com"
<swagger-sw...@googlegroups.com>
Date: Wednesday, 28 December 2016 at
5:23
To: Swagger
<swagger-sw...@googlegroups.com>
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:
<swagger-sw...@googlegroups.com>
on behalf of Dali <moh...@fifty-five.com>
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(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.packagesMy Api calls
ian. - Parlamentul ia act de renuntarea printului Carol la tron. 26 mart. - Semnarea unui tratat de garantie intre Romania si Polonia. 27 mart. - Adoptarea unei noi legi electorale. 20 iul. - Moartea regelui Ferdinand. ii urmeaza nepotul sau Mihai sub tutela unei Regente.192624 apr. - Tratat de neutralitate si neagresiune intre Germania si U.R.S.S. mai. nov. - Greva generala in Marea Bri-tanie.

Dali

unread,
Jan 11, 2017, 9:31:55 AM1/11/17
to Swagger

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'

Here are my logs :

 

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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+unsub...@googlegroups.com.


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+unsub...@googlegroups.com.


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+unsub...@googlegroups.com.

Ron Ratovsky

unread,
Jan 11, 2017, 11:06:03 AM1/11/17
to swagger-sw...@googlegroups.com

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.

Here are my logs :

 

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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-swaggers...@googlegroups.com.


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-swaggers...@googlegroups.com.


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-swaggers...@googlegroups.com.


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-swaggers...@googlegroups.com.

Message has been deleted

lang...@yahoo.com

unread,
Jan 26, 2017, 1:25:22 PM1/26/17
to swagger-sw...@googlegroups.com

--------------------------------------------
On Thu, 1/26/17, Dali <moh...@fifty-five.com> wrote:

Subject: Re: Can't get swagger.json
To: "Swagger" <swagger-sw...@googlegroups.com>
Date: Thursday, January 26, 2017, 7:21 PM

Hello !
My dependency treecompile
:
+--- org.slf4j:slf4j-api:1.7.12+---
org.slf4j:slf4j-jdk14:1.7.12|    \---
org.slf4j:slf4j-api:1.7.12+---
org.slf4j:slf4j-log4j12:1.7.12|    +---
org.slf4j:slf4j-api:1.7.12|    \---
log4j:log4j:1.2.17+---
log4j:log4j:1.2.17+---
org.json:json:20090211+---
org.codehaus.jackson:jackson-core-asl:1.9.13+---
com.google.guava:guava:15.0 -> 18.0+---
org.glassfish.jersey.core:jersey-server:2.22.2|
   +---
org.glassfish.jersey.core:jersey-common:2.22.2|
   |    +---
javax.ws.rs:javax.ws.rs-api:2.0.1|    |  
 +--- javax.annotation:javax.annotation-api:1.2|
   |    +---
org.glassfish.jersey.bundles.repackaged:jersey-guava:2.22.2|
   |    +---
org.glassfish.hk2:hk2-api:2.4.0-b34|    |  
 |    +--- javax.inject:javax.inject:1|    |
   |    +---
org.glassfish.hk2:hk2-utils:2.4.0-b34|    |  
 |    |    \---
javax.inject:javax.inject:1|    |    |  
 \---
org.glassfish.hk2.external:aopalliance-repackaged:2.4.0-b34|
   |    +---
org.glassfish.hk2.external:javax.inject:2.4.0-b34|
   |    +---
org.glassfish.hk2:hk2-locator:2.4.0-b34|    |
   |    +---
org.glassfish.hk2.external:javax.inject:2.4.0-b34|
   |    |    +---
org.glassfish.hk2.external:aopalliance-repackaged:2.4.0-b34|
   |    |    +--- org.glassfish.hk2:hk2-api:2.4.0-b34
(*)|    |    |    +---
org.glassfish.hk2:hk2-utils:2.4.0-b34 (*)|    |
   |    \--- org.javassist:javassist:3.18.1-GA ->
3.18.2-GA|    |    \---
org.glassfish.hk2:osgi-resource-locator:1.0.1|  
 +---
org.glassfish.jersey.core:jersey-client:2.22.2|
   |    +---
javax.ws.rs:javax.ws.rs-api:2.0.1|    |  
 +--- org.glassfish.jersey.core:jersey-common:2.22.2
(*)|    |    +---
org.glassfish.hk2:hk2-api:2.4.0-b34 (*)|    |
   +---
org.glassfish.hk2.external:javax.inject:2.4.0-b34|
   |    \--- org.glassfish.hk2:hk2-locator:2.4.0-b34
(*)|    +---
javax.ws.rs:javax.ws.rs-api:2.0.1|    +---
org.glassfish.jersey.media:jersey-media-jaxb:2.22.2|
   |    +---
org.glassfish.jersey.core:jersey-common:2.22.2
(*)|    |    +---
org.glassfish.hk2:hk2-api:2.4.0-b34 (*)|    |
   +---
org.glassfish.hk2.external:javax.inject:2.4.0-b34|
   |    +--- org.glassfish.hk2:hk2-locator:2.4.0-b34
(*)|    |    \---
org.glassfish.hk2:osgi-resource-locator:1.0.1|  
 +--- javax.annotation:javax.annotation-api:1.2|
   +--- org.glassfish.hk2:hk2-api:2.4.0-b34
(*)|    +---
org.glassfish.hk2.external:javax.inject:2.4.0-b34|
   +--- org.glassfish.hk2:hk2-locator:2.4.0-b34
(*)|    \---
javax.validation:validation-api:1.1.0.Final+---
org.glassfish.jersey.core:jersey-client:2.22.2
(*)+---
org.glassfish.jersey.containers:jersey-container-servlet:2.22.2|
   +---
org.glassfish.jersey.containers:jersey-container-servlet-core:2.22.2|
   |    +---
org.glassfish.hk2.external:javax.inject:2.4.0-b34|
   |    +---
org.glassfish.jersey.core:jersey-common:2.22.2
(*)|    |    +---
org.glassfish.jersey.core:jersey-server:2.22.2
(*)|    |    \---
javax.ws.rs:javax.ws.rs-api:2.0.1|    +---
org.glassfish.jersey.core:jersey-common:2.22.2
(*)|    +---
org.glassfish.jersey.core:jersey-server:2.22.2
(*)|    \---
javax.ws.rs:javax.ws.rs-api:2.0.1+---
org.glassfish.jersey.containers:jersey-container-jetty-servlet:2.22.2|
   +---
org.glassfish.jersey.containers:jersey-container-servlet:2.22.2
(*)|    +---
org.glassfish.jersey.containers:jersey-container-jetty-http:2.22.2|
   |    +---
org.glassfish.hk2.external:javax.inject:2.4.0-b34|
   |    +---
org.eclipse.jetty:jetty-server:9.1.1.v20140108 ->
9.1.6.v20160112|    |    |    +---
javax.servlet:javax.servlet-api:3.1.0|    |  
 |    +---
org.eclipse.jetty:jetty-http:9.1.6.v20160112|  
 |    |    |    \---
org.eclipse.jetty:jetty-util:9.1.6.v20160112|  
 |    |    \---
org.eclipse.jetty:jetty-io:9.1.6.v20160112|  
 |    |         \---
org.eclipse.jetty:jetty-util:9.1.6.v20160112|  
 |    +--- org.eclipse.jetty:jetty-util:9.1.1.v20140108
-> 9.1.6.v20160112|    |    +---
org.eclipse.jetty:jetty-continuation:9.1.1.v20140108|
   |    +---
org.glassfish.jersey.core:jersey-common:2.22.2
(*)|    |    +---
org.glassfish.jersey.core:jersey-server:2.22.2
(*)|    |    \---
javax.ws.rs:javax.ws.rs-api:2.0.1|    +---
org.eclipse.jetty:jetty-webapp:9.1.1.v20140108|
   |    +---
org.eclipse.jetty:jetty-xml:9.1.1.v20140108|  
 |    |    \---
org.eclipse.jetty:jetty-util:9.1.1.v20140108 ->
9.1.6.v20160112|    |    \---
org.eclipse.jetty:jetty-servlet:9.1.1.v20140108|
   |         \---
org.eclipse.jetty:jetty-security:9.1.1.v20140108|
   |              \---
org.eclipse.jetty:jetty-server:9.1.1.v20140108 ->
9.1.6.v20160112 (*)|    +---
org.glassfish.jersey.core:jersey-common:2.22.2
(*)|    +---
org.glassfish.jersey.core:jersey-server:2.22.2
(*)|    \---
javax.ws.rs:javax.ws.rs-api:2.0.1+---
org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.22.2|
   +---
org.glassfish.hk2.external:javax.inject:2.4.0-b34|
   +---
org.glassfish.grizzly:grizzly-http-server:2.3.23|
   |    \---
org.glassfish.grizzly:grizzly-http:2.3.23|    |
        \---
org.glassfish.grizzly:grizzly-framework:2.3.23|
   +--- org.glassfish.jersey.core:jersey-common:2.22.2
(*)|    +---
org.glassfish.jersey.core:jersey-server:2.22.2
(*)|    \---
javax.ws.rs:javax.ws.rs-api:2.0.1+---
org.eclipse.jetty:jetty-server:9.1.6.v20160112
(*)+---
org.glassfish.jersey.media:jersey-media-json-jackson:2.22.2|
   +--- org.glassfish.jersey.core:jersey-common:2.22.2
(*)|    +---
org.glassfish.jersey.ext:jersey-entity-filtering:2.22.2|
   |    \---
javax.ws.rs:javax.ws.rs-api:2.0.1|    +---
com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.5.4|
   |    +---
com.fasterxml.jackson.core:jackson-core:2.5.4 ->
2.8.4|    |    \---
com.fasterxml.jackson.core:jackson-databind:2.5.4 ->
2.8.4|    |         +---
com.fasterxml.jackson.core:jackson-annotations:2.8.0 ->
2.8.4|    |         \---
com.fasterxml.jackson.core:jackson-core:2.8.4|  
 +---
com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.5.4|
   |    +---
com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.5.4
(*)|    |    +---
com.fasterxml.jackson.core:jackson-core:2.5.4 ->
2.8.4|    |    +---
com.fasterxml.jackson.core:jackson-databind:2.5.4 ->
2.8.4 (*)|    |    \---
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.5.4|
   |         +---
com.fasterxml.jackson.core:jackson-core:2.5.4 ->
2.8.4|    |         \---
com.fasterxml.jackson.core:jackson-databind:2.5.4 ->
2.8.4 (*)|    \---
com.fasterxml.jackson.core:jackson-annotations:2.5.4 ->
2.8.4+---
org.glassfish.jersey.media:jersey-media-multipart:2.22.2|
   +--- org.glassfish.jersey.core:jersey-common:2.22.2
(*)|    \---
org.jvnet.mimepull:mimepull:1.9.6+---
javax.servlet:javax.servlet-api:3.1.0+---
org.apache.commons:commons-email:1.3.3|    +---
javax.mail:mail:1.4.5|    |    \---
javax.activation:activation:1.1 -> 1.1.1|  
 \--- javax.activation:activation:1.1.1+---
org.mongodb:mongo-java-driver:2.14.1+---
commons-io:commons-io:2.4+---
com.codahale.metrics:metrics-core:3.0.1|  
 \--- org.slf4j:slf4j-api:1.7.5 ->
1.7.12+---
io.swagger:swagger-core:1.5.12|    +---
org.apache.commons:commons-lang3:3.2.1|    +---
org.slf4j:slf4j-api:1.6.3 -> 1.7.12|    +---
com.fasterxml.jackson.core:jackson-annotations:2.8.4|
   +--- com.fasterxml.jackson.core:jackson-databind:2.8.4
(*)|    +---
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.4|
   |    +---
com.fasterxml.jackson.core:jackson-core:2.8.4|  
 |    \--- org.yaml:snakeyaml:1.15|  
 +--- io.swagger:swagger-models:1.5.12|    |
   +---
com.fasterxml.jackson.core:jackson-annotations:2.8.4|
   |    +--- org.slf4j:slf4j-api:1.6.3 ->
1.7.12|    |    \---
io.swagger:swagger-annotations:1.5.12|    +---
com.google.guava:guava:18.0|    \---
javax.validation:validation-api:1.1.0.Final\---
io.swagger:swagger-jaxrs:1.5.12     +---
com.fasterxml.jackson.core:jackson-databind:2.8.4
(*)     +--- io.swagger:swagger-core:1.5.12
(*)     +---
javax.ws.rs:jsr311-api:1.1.1     +---
org.reflections:reflections:0.9.10     |  
 +--- com.google.guava:guava:18.0     |  
 +--- org.javassist:javassist:3.18.2-GA     |
   \---
com.google.code.findbugs:annotations:2.0.1   
 \--- com.google.guava:guava:18.0(*) -
dependencies omitted (listed previously)

On Wednesday, January 11, 2017 at 5:06:03 PM UTC+1, Ron
wrote: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:
<swagger-sw...@ googlegroups.com> on
22.2'  compile 'org.glassfish.jersey.media:
jersey-media-multipart:2.22.2' 
compile 'javax.servlet:javax.servlet-a
pi: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:
<swagger-sw...@googlegroups. com> on
behalf of Dali <moh...@fifty-five.com>
Reply-To: "swagger-sw...@googlegroups. com"
<swagger-sw...@googlegroups.
com>
Date: Monday, 2 January 2017 at 8:31
To: Swagger <swagger-sw...@googlegroups. com>
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.Serv
java.util.LinkedList.checkElem
entIndex(LinkedList.java:553)         at
java.util.LinkedList.get(Linke
dList.java:474)         at
java.util.Collections$
UnmodifiableList.get(Collectio
ns.java:1211)         at
com.fiftyfive.services.filters .InstanceContextFilter.filter(
InstanceContextFilter.java:54)         at
org.glassfish.jersey.server.Co
ntainerFilteringStage.apply(Co
ntainerFilteringStage.java:132 )         at
org.glassfish.jersey.server.Co
ntainerFilteringStage.apply(Co
ntainerFilteringStage.java:68)         at
org.glassfish.jersey.process.i
nternal.Stages.process(Stages. java:197)         at
org.glassfish.jersey.server.Se
rverRuntime$2.run(ServerRuntim
e.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.i
nternal.RequestScope.runInScop
e(RequestScope.java:317)         at
org.glassfish.jersey.server.Se
rverRuntime.process(ServerRunt
ime.java:305)         at
org.glassfish.jersey.server.Ap
plicationHandler.handle(Applic
ationHandler.java:1154)         at
org.glassfish.jersey.servlet.W
ebComponent.serviceImpl(WebCom
ponent.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:
<swagger-sw...@googlegroups. com> on
behalf of Dali <moh...@fifty-five.com>
Reply-To: "swagger-sw...@googlegroups. com"
<swagger-sw...@googlegroups.
com>
Date: Thursday, 29 December 2016 at 5:59
To: Swagger <swagger-sw...@googlegroups. com>
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.setInitPar
ameter(ServerProperties.PROVID
ER_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:
<swagger-sw...@googlegroups. com> on
behalf of Dali <moh...@fifty-five.com>
Reply-To: "swagger-sw...@googlegroups. com"
<swagger-sw...@googlegroups.
com>
Date: Wednesday, 28 December 2016 at 5:23
To: Swagger <swagger-sw...@googlegroups. com>
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:
<swagger-sw...@googlegroups. com> on
behalf of Dali <moh...@fifty-five.com>
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
from it, send an email to swagger-swaggersocket+
unsub...@googlegroups.com.
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+
unsub...@googlegroups.com.
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+
unsub...@googlegroups.com.
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+
unsub...@googlegroups.com.
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+
unsub...@googlegroups.com.
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-swaggers...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
n artele plastice factorul de legatura l-a constituit Sindicatul Artelor Frumoase avand ca scop principal sustinerea intereselor de breasla ale plasticienilor si reprezentarea lor pe plan civic. in paralel au activat diferite grupari constituite pe criteriul afinitatilor estetice intre care cele mai importante

calde...@yahoo.com

unread,
Jan 26, 2017, 7:20:17 PM1/26/17
to swagger-sw...@googlegroups.com

--------------------------------------------
On Thu, 1/26/17, lange.kay via Swagger <swagger-sw...@googlegroups.com> wrote:

Subject: Re: Can't get swagger.json
To: swagger-sw...@googlegroups.com
Date: Thursday, January 26, 2017, 8:22 PM
https://groups.google.com/d/optout.emnificativa este in aceeasi ordine de idei si structura gospodariilor din Basarabia in anul 1817 potrivit careia din totalul de 96 528 gospodarii basarabene luate in calcul cele romanesti reprezentau asadar peste 94%.Gospodariile dupa structura etnica a membrilor lorMoldovenesti romanesti EvreiestiGrecestiArmenestiBulgaresti si gagauze

diaz_car...@yahoo.com

unread,
Jan 27, 2017, 12:19:12 AM1/27/17
to swagger-sw...@googlegroups.com

--------------------------------------------
On Fri, 1/27/17, caldercarey via Swagger <swagger-sw...@googlegroups.com> wrote:

Subject: Re: Can't get swagger.json
To: swagger-sw...@googlegroups.com
Date: Friday, January 27, 2017, 2:17 AM
https://groups.google.com/d/optout.9 ian 10 febr - Legea privind cesiunea cailor ferate catre statul roman acestea apartinand Societatii actionarilor febr - Fondarea Partidului Conservator 9 21 mart - Legea pentru organizarea Dobrogei
Message has been deleted

Dali

unread,
Feb 3, 2017, 5:15:02 AM2/3/17
to Swagger
Hello,

My dependencies : 


compile - Compile classpath for source set 'main'.
+--- org.slf4j:slf4j-api:1.7.12
On Tuesday, January 10, 2017 at 7:20:07 PM UTC+1, Ron wrote:

Here are my logs :

 

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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+unsub...@googlegroups.com.


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+unsub...@googlegroups.com.


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+unsub...@googlegroups.com.

Dali

unread,
Sep 20, 2017, 5:52:11 AM9/20/17
to Swagger
Any help ?

Dali

unread,
Sep 21, 2017, 11:58:01 AM9/21/17
to Swagger
Finally i found the solution. I registred explicitely ApiListingResource & SwaggerSerializers 

ResourceConfig resourceConfig = new ResourceConfig();

resourceConfig.packages("com.fiftyfive.services.apis",

        "io.swagger.jaxrs.listing");

ServletContainer servletContainer = new ServletContainer(resourceConfig);


Reply all
Reply to author
Forward
0 new messages