Re: Cant locate swagger.json on java + embedded jetty + httpservlet + swagger integration

2017-01-03 Thread frazierjanice629 via Swagger


On Tue, 1/3/17, diaz_carolyn97772 via Swagger 
 wrote:

 Subject: Re: Cant locate swagger.json on java + embedded jetty + httpservlet + 
swagger integration
 To: swagger-swaggersocket@googlegroups.com
 Date: Tuesday, January 3, 2017, 11:43 PM
 
 
 
 On Tue, 1/3/17, janet vanderpuye 
 wrote:
 
  Subject: Re: Cant locate swagger.json on java + embedded
 jetty + httpservlet + swagger integration
  To: "Swagger" 
  Date: Tuesday, January 3, 2017, 10:23 PM
  
  Hi Guys, 
  Happy new year. I have a committed the
  problematic code here (https://github.com/rhycce/swaggersample.git)
  as requested. I would be grateful if you could check it
 out
  and help me resolve it.
  This is the current output I have from swagger
  when I run it. As you can see, there is no documentation
  included from the portions annotated @Api, @ApiParam, etc
  only the annotations described within the @Info
  section.
  {  "swagger":
  "2.0",  "info":
  {   
  "description": "Servlet that handles basic
  CRUD operations to the user profile data
  source",   
  "version": "1.0.0",    "title":
  "User Profile Servlet",   
  "termsOfService": "XYZ",   
  "contact": {     
  "name": "XYZ",     
  "url": "XYZ",     
  "email": "XYZ"    },   
  "license": {     
  "name": "XYZ",     
  "url": "XYZ"    }  },  "host":
  "localhost:7000",  "basePath":
  "/",  "tags":
  [   
  {     
  "name": "users",     
  "description": "CRUD operations on user
  datatype"    }  ],  "schemes":
  [   
  "http",   
  "https"  ],  "consumes":
  [   
  "application/json"  ],  "produces":
  [   
  "application/json"  ]}
  
  
  Thanks a lot. All help appreciated.
  On Tuesday, 27 December 2016 17:46:10 UTC-5, Ron 
  wrote:At this point,
  I’d ask that you provide a sample app that reproduces it
  – would be difficult to try and debug it
  otherwise.   From:
   on
  behalf of janet vanderpuye 
  Reply-To: "swagger-sw...@
  googlegroups.com" 
  Date: Tuesday, 27 December 2016 at 14:36
  To: Swagger 
  Subject: Re: Cant locate swagger.json on java +
  embedded jetty + httpservlet + swagger
  integration Yeah, that is what I have
  now. I have commented out the part where I use the
  multipackages. When I use one package, it partially works.
 I
  get only the data within the @Info annotations but nothing
  from the @API annotations.
  
  On Tuesday, 27 December 2016 17:05:29 UTC-5, Ron wrote:
  For the
  ‘resource scanning’ that is.  From:
   on
  behalf of Ron Ratovsky 
  Reply-To: "swagger-sw...@googlegroups.
 com"
  
  Date: Tuesday, 27 December 2016 at 14:04
  To: "swagger-sw...@googlegroups.
 com"
  
  Subject: Re: Cant locate swagger.json on java +
  embedded jetty + httpservlet + swagger
  integration Okay, since
  you mentioned using two packages isn’t working, what
  happens if you only set com.coreservices.servlet for the
  resource packing?   From:
   on
  behalf of janet vanderpuye 
  Reply-To: "swagger-sw...@googlegroups.
 com"
  
  Date: Tuesday, 27 December 2016 at 13:06
  To: Swagger 
  Subject: Re: Cant locate swagger.json on java +
  embedded jetty + httpservlet + swagger
  integration Maybe. Here is what I have so
  far.  Main.javaimport
  org.eclipse.jetty.server. Server;import
  org.eclipse.jetty.servlet.
  ServletContextHandler;import
  org.eclipse.jetty.servlet.
  ServletHolder;import
  io.swagger.servlet.listing.
  ApiDeclarationServlet;import
  io.swagger.servlet.config.
  DefaultServletConfig;   Server server =
  new Server(Integer.parseInt(
 properties.getProperty(Config.
  JETTY_SERVICE_PORT)));       
  ServletContextHandler servletContextHandler = new
  ServletContextHandler( ServletContextHandler.
  SESSIONS);       
  servletContextHandler.
  setContextPath("/");       
  server.setHandler(
  servletContextHandler);         //Custom
  servlet       
  ServletHolder apiservlet = servletContextHandler.
  addServlet(ProfileServlet. class,
  "/user/*");       
  apiservlet.setInitOrder(3);        logger.info("User
 profile
  server initialized.");         //
  Swagger servlet reader       
  ServletHolder swaggerServlet = servletContextHandler.
  addServlet( DefaultServletConfig.class,
  "/swagger-core");       
  swaggerServlet.setInitOrder(2) ;       
  swaggerServlet. setInitParameter("api.version" ,
  "1.0.0");       
  //swaggerServlet. setInitParameter("swagger.
  resource.package", "com.coreservices.servlets,
  com.coreservices.datatypes");       
  swaggerServlet. setInitParameter("swagger.
  

Editor

2017-01-03 Thread Joseph Juhnke
Hi guys,

I'm playing around with Swagger and I've run into an issue with responses. 
Has anyone noticed the "GET /products try this operation" doesn't return 
anything? 

http://editor.swagger.io/#/

I get this only: 

HTTP/1.1 

I'm entering junk numbers for latitude and longitude. What am I doing 
wrong? 

Thanks in advance,

J

-- 
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.


Swagger Authentication issue.

2017-01-03 Thread polu . java
HI 
 We are using the swagger for documenting the RestApi. 
  Jax-rs2 we are using with  Jersey implementation .Please find the maven 
dependencies.
Could you help me how to provide kind of login page authentication  for My 
swagger ui .

io.springfox
springfox-swagger2
2.4.0



io.springfox
springfox-swagger-ui
2.4.0



io.swagger
swagger-jersey2-jaxrs
1.5.10

Thanks 

-- 
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.


extend swagger ui with /health route

2017-01-03 Thread Shail Patel
I need help extending swagger UI to have a /health route. I need this for 
haproxy to check if the swagger UI instance is up and running.

I've provided more details 
here: 
http://stackoverflow.com/questions/41453685/how-to-add-a-route-to-swagger-ui

Any help would be much appreciated!

-- 
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.


Re: Cant locate swagger.json on java + embedded jetty + httpservlet + swagger integration

2017-01-03 Thread diaz_carolyn97772 via Swagger


On Tue, 1/3/17, janet vanderpuye  wrote:

 Subject: Re: Cant locate swagger.json on java + embedded jetty + httpservlet + 
swagger integration
 To: "Swagger" 
 Date: Tuesday, January 3, 2017, 10:23 PM
 
 Hi Guys, 
 Happy new year. I have a committed the
 problematic code here (https://github.com/rhycce/swaggersample.git)
 as requested. I would be grateful if you could check it out
 and help me resolve it.
 This is the current output I have from swagger
 when I run it. As you can see, there is no documentation
 included from the portions annotated @Api, @ApiParam, etc
 only the annotations described within the @Info
 section.
 {  "swagger":
 "2.0",  "info":
 {   
 "description": "Servlet that handles basic
 CRUD operations to the user profile data
 source",   
 "version": "1.0.0",    "title":
 "User Profile Servlet",   
 "termsOfService": "XYZ",   
 "contact": {     
 "name": "XYZ",     
 "url": "XYZ",     
 "email": "XYZ"    },   
 "license": {     
 "name": "XYZ",     
 "url": "XYZ"    }  },  "host":
 "localhost:7000",  "basePath":
 "/",  "tags":
 [   
 {     
 "name": "users",     
 "description": "CRUD operations on user
 datatype"    }  ],  "schemes":
 [   
 "http",   
 "https"  ],  "consumes":
 [   
 "application/json"  ],  "produces":
 [   
 "application/json"  ]}
 
 
 Thanks a lot. All help appreciated.
 On Tuesday, 27 December 2016 17:46:10 UTC-5, Ron 
 wrote:At this point,
 I’d ask that you provide a sample app that reproduces it
 – would be difficult to try and debug it
 otherwise.   From:
  on
 behalf of janet vanderpuye 
 Reply-To: "swagger-sw...@
 googlegroups.com" 
 Date: Tuesday, 27 December 2016 at 14:36
 To: Swagger 
 Subject: Re: Cant locate swagger.json on java +
 embedded jetty + httpservlet + swagger
 integration Yeah, that is what I have
 now. I have commented out the part where I use the
 multipackages. When I use one package, it partially works. I
 get only the data within the @Info annotations but nothing
 from the @API annotations.
 
 On Tuesday, 27 December 2016 17:05:29 UTC-5, Ron wrote:
 For the
 ‘resource scanning’ that is.  From:
  on
 behalf of Ron Ratovsky 
 Reply-To: "swagger-sw...@googlegroups. com"
 
 Date: Tuesday, 27 December 2016 at 14:04
 To: "swagger-sw...@googlegroups. com"
 
 Subject: Re: Cant locate swagger.json on java +
 embedded jetty + httpservlet + swagger
 integration Okay, since
 you mentioned using two packages isn’t working, what
 happens if you only set com.coreservices.servlet for the
 resource packing?   From:
  on
 behalf of janet vanderpuye 
 Reply-To: "swagger-sw...@googlegroups. com"
 
 Date: Tuesday, 27 December 2016 at 13:06
 To: Swagger 
 Subject: Re: Cant locate swagger.json on java +
 embedded jetty + httpservlet + swagger
 integration Maybe. Here is what I have so
 far.  Main.javaimport
 org.eclipse.jetty.server. Server;import
 org.eclipse.jetty.servlet.
 ServletContextHandler;import
 org.eclipse.jetty.servlet.
 ServletHolder;import
 io.swagger.servlet.listing.
 ApiDeclarationServlet;import
 io.swagger.servlet.config.
 DefaultServletConfig;   Server server =
 new Server(Integer.parseInt( properties.getProperty(Config.
 JETTY_SERVICE_PORT)));       
 ServletContextHandler servletContextHandler = new
 ServletContextHandler( ServletContextHandler.
 SESSIONS);       
 servletContextHandler.
 setContextPath("/");       
 server.setHandler(
 servletContextHandler);         //Custom
 servlet       
 ServletHolder apiservlet = servletContextHandler.
 addServlet(ProfileServlet. class,
 "/user/*");       
 apiservlet.setInitOrder(3);        logger.info("User profile
 server initialized.");         //
 Swagger servlet reader       
 ServletHolder swaggerServlet = servletContextHandler.
 addServlet( DefaultServletConfig.class,
 "/swagger-core");       
 swaggerServlet.setInitOrder(2) ;       
 swaggerServlet. setInitParameter("api.version" ,
 "1.0.0");       
 //swaggerServlet. setInitParameter("swagger.
 resource.package", "com.coreservices.servlets,
 com.coreservices.datatypes");       
 swaggerServlet. setInitParameter("swagger.
 resource.package","com.
 coreservices.servlets");       
 swaggerServlet. setInitParameter("swagger.api.
 basepath", "http://localhost:7000;);         //
 Swagger api declaration       
 servletContextHandler. addServlet(
 ApiDeclarationServlet.class,
 "/api/*");       
 server.start(); ProfileServlet.java /**custom
 httpservlet class**/import
 io.swagger.annotations.*;import
 org.apache.log4j.Logger; import
 javax.servlet. ServletException;import
 javax.servlet.http. 

Re: Cant locate swagger.json on java + embedded jetty + httpservlet + swagger integration

2017-01-03 Thread janet vanderpuye
Hi Guys, 

Happy new year. I have a committed the problematic code here 
 
(https://github.com/rhycce/swaggersample.git) 
as requested. I would be grateful if you could check it out and help me 
resolve it.

This is the current output I have from swagger when I run it. As you can 
see, there is no documentation included from the portions annotated @Api, 
@ApiParam, etc only the annotations described within the @Info section.

{
  "swagger": "2.0",
  "info": {
"description": "Servlet that handles basic CRUD operations to the user 
profile data source",
"version": "1.0.0",
"title": "User Profile Servlet",
"termsOfService": "XYZ",
"contact": {
  "name": "XYZ",
  "url": "XYZ",
  "email": "XYZ"
},
"license": {
  "name": "XYZ",
  "url": "XYZ"
}
  },
  "host": "localhost:7000",
  "basePath": "/",
  "tags": [
{
  "name": "users",
  "description": "CRUD operations on user datatype"
}
  ],
  "schemes": [
"http",
"https"
  ],
  "consumes": [
"application/json"
  ],
  "produces": [
"application/json"
  ]
}



Thanks a lot. All help appreciated.

On Tuesday, 27 December 2016 17:46:10 UTC-5, Ron wrote:
>
> At this point, I’d ask that you provide a sample app that reproduces it – 
> would be difficult to try and debug it otherwise.
>
>  
>
>  
>
>  
>
> *From: * on behalf of janet 
> vanderpuye 
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Tuesday, 27 December 2016 at 14:36
> *To: *Swagger 
> *Subject: *Re: Cant locate swagger.json on java + embedded jetty + 
> httpservlet + swagger integration
>
>  
>
> Yeah, that is what I have now. I have commented out the part where I use 
> the multipackages. When I use one package, it partially works. I get only 
> the data within the @Info annotations but nothing from the @API annotations.
>
> On Tuesday, 27 December 2016 17:05:29 UTC-5, Ron wrote: 
>
> For the ‘resource scanning’ that is.
>
>  
>
>  
>
> *From: * on behalf of Ron Ratovsky <
> r...@swagger.io>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Tuesday, 27 December 2016 at 14:04
> *To: *"swagger-sw...@googlegroups.com" 
> *Subject: *Re: Cant locate swagger.json on java + embedded jetty + 
> httpservlet + swagger integration
>
>  
>
> Okay, since you mentioned using two packages isn’t working, what happens 
> if you only set com.coreservices.servlet for the resource packing?
>
>  
>
>  
>
>  
>
> *From: * on behalf of janet vanderpuye <
> rhy...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Tuesday, 27 December 2016 at 13:06
> *To: *Swagger 
> *Subject: *Re: Cant locate swagger.json on java + embedded jetty + 
> httpservlet + swagger integration
>
>  
>
> Maybe. Here is what I have so far. 
>
>  
>
> Main.java
>
> import org.eclipse.jetty.server.Server;
>
> import org.eclipse.jetty.servlet.ServletContextHandler;
>
> import org.eclipse.jetty.servlet.ServletHolder;
>
> import io.swagger.servlet.listing.ApiDeclarationServlet;
>
> import io.swagger.servlet.config.DefaultServletConfig;
>
>  
>
>  
>
>  Server server = new 
> Server(Integer.parseInt(properties.getProperty(Config.JETTY_SERVICE_PORT)));
>
> ServletContextHandler servletContextHandler = new 
> ServletContextHandler(ServletContextHandler.SESSIONS);
>
> servletContextHandler.setContextPath("/");
>
> server.setHandler(servletContextHandler);
>
>  
>
> //Custom servlet
>
> ServletHolder apiservlet = 
> servletContextHandler.addServlet(ProfileServlet.class, "/user/*");
>
> apiservlet.setInitOrder(3);
>
> logger.info("User profile server initialized.");
>
>  
>
> // Swagger servlet reader
>
> ServletHolder swaggerServlet = 
> servletContextHandler.addServlet(DefaultServletConfig.class, 
> "/swagger-core");
>
> swaggerServlet.setInitOrder(2);
>
> swaggerServlet.setInitParameter("api.version", "1.0.0");
>
> //swaggerServlet.setInitParameter("swagger.resource.package", 
> "com.coreservices.servlets,com.coreservices.datatypes");
>
> 
> swaggerServlet.setInitParameter("swagger.resource.package","com.coreservices.servlets");
>
> swaggerServlet.setInitParameter("swagger.api.basepath", "
> http://localhost:7000;);
>
>  
>
> // Swagger api declaration
>
> servletContextHandler.addServlet(ApiDeclarationServlet.class, 
> "/api/*");
>
> server.start();
>
>  
>
> ProfileServlet.java /**custom httpservlet class**/
>
> import io.swagger.annotations.*;
>
> import org.apache.log4j.Logger;
>
>  
>
> import javax.servlet.ServletException;
>
> import 

Re: Post request issue

2017-01-03 Thread tony tam
Please take a look at the swagger petstore example at http://petstore.swagger.io

> On Jan 3, 2017, at 6:46 AM, pria  wrote:
> 
> I'm trying to create a POST request with various parameters with in the body 
> of the request. However I'm unable to generate the swagger ui where I can 
> input the request parameters. Would appreciate if anyone has dealt with this 
> issue and what's the right way to fix it. Thank you!  
> 
> -- 
> 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 
> .

-- 
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.


Re: swagger doclet does not generate the swagger documentation

2017-01-03 Thread tony tam
Hi, you should probably open an issue on that repository.

> On Jan 3, 2017, at 9:08 AM, manouche.li9...@gmail.com wrote:
> 
> hello everyone 
> iam new to swagger 
> i need your help to understand how things go 
> actually, i'm using swagger doclet to generate swagger specification for a 
> rest API 
> i used the directives from https://github.com/conorroche/swagger-doclet 
>  
> i added the maven part 
> but nothing was generated 
> im expecting service.json file 
> can anyone give me some help ? 
> 
> -- 
> 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 
> .

-- 
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.


swagger doclet does not generate the swagger documentation

2017-01-03 Thread manouche . li9001
hello everyone 
iam new to swagger 
i need your help to understand how things go 
actually, i'm using swagger doclet to generate swagger specification for a 
rest API 
i used the directives from https://github.com/conorroche/swagger-doclet 
i added the maven part 
but nothing was generated 
im expecting service.json file 
can anyone give me some help ? 

-- 
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.