Same resource path

2016-09-06 Thread avinash . upadhya28
Is there any way i can have document two method with same name but with 
different input parameter?

I am having a situation where i need to document the resources which all 
are hosted on a same path (kind of micro services in 
MyProjects/get?Parameters) but each micro-service has a same name but 
different input parameters.

When i annotate my Java source code it generates the paths. But Shen i feed 
this json to swaggerUI it gives me only one micro-service (i believe this 
is because same resource path `MyProjects/get)

-- 
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: Change REST controller link name from auto-generated

2016-09-06 Thread Dilip Krishnan
Assuming you're using springfox you could alter the names by adding tags to 
you `@ApiOperation`

On Thursday, September 1, 2016 at 10:18:42 AM UTC-5, Ilya Zinkevich wrote:
>
> Hi all,
>
> By default, SwaggerUI in java generates such names for Spring controller 
> classes:
> AaaaController.java - > -controller
> AaaaBbbbController.java - > --controller
>
> Can I change this somehow? Ideally, I'd like to define explicit names.
>
> BR, Ilya
>

-- 
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-jersey-jaxrs genereates duplicate operationIds when using inheritance

2016-09-06 Thread tony tam
You can use the “nickname” attribute in the @ApiOperation annotation, see here:

https://github.com/swagger-api/swagger-core/blob/master/modules/swagger-annotations/src/main/java/io/swagger/annotations/ApiOperation.java
 


> On Sep 6, 2016, at 2:37 PM, alex.rhomb...@temet.ch wrote:
> 
> I use swagger-jersey-jaxrs to generation swagger.json from my JAX-RS 
> interface with annotations.
> To define the REST interface for several objects, I use inheritance, with 
> services defined in base classes that are available in several subclasses.
> 
> Now the generated swagger.json correctly shows the separate instances of the 
> service, but all instances get the same operationId taken from the Java 
> method name. This causes the Swagger editor to complain about duplicate 
> operationIds:
> 
> Cannot have multiple operations with the same operationId: createOrder
> 
> 
> How can I make the Swagger generator produce unique operationIds, or omit 
> them at all, if they are not mandatory?
> 
> -- 
> 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: Customize swagger paths

2016-09-06 Thread avinash . upadhya28
In Short in My api/servlet there are several micro-services.. I wanted to 
document these services. Please let me know any suggestions  

On Tuesday, 6 September 2016 13:13:27 UTC+5:30, avinash@gmail.com wrote:
>
> Hi Folks,
>
> I have a servlet which redirects to a appropriate REST resource based on 
> input parameter. So i have annotated all my resource methods 
> with @ApiOperation. But its taking the method name for creating the 
> Resource path.I wanted it to take the Servlet path as the resource path. 
>
> Can any one please let me know how can i customize this path name. I am 
> using the Swagger-servlet module.  
>
> Please let me know if anything is not clear above.
>
> Regards,
>
>

-- 
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: refs in get parameters not allow

2016-09-06 Thread tony tam
Hi, they should not work, because it’s not supported by the Swagger / OpenAPI 
Specification.  Thus the tooling does not support it.

> On Sep 6, 2016, at 6:24 AM, Peppe  wrote:
> 
> Hello, I'm trying to get this code working but I get a invalid parameter 
> definition error. Is it possible to link a complex object inside an array of 
> the get parameters??  Here is the code I'm using:
> Thank you!!
> 
> swagger: '2.0'
> info:
>   version: 0.0.0
>   title: Simple API
> paths:
>   /:
> get:
>   parameters:
> - name: passengers
>   in: query
>   type: array
>   items:
> #$refs: '#/definitions/pax'
> type: string 
> 
>   responses:
> 200:
>   description: OK
> 
> definitions:
>   pax:
> type: object
> properties:
>   name:
> type: string
>   familyname:
> type: string
> 
> -- 
> 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.


refs in get parameters not allow

2016-09-06 Thread Peppe
Hello, I'm trying to get this code working but I get a invalid parameter 
definition error. Is it possible to link a complex object inside an array 
of the get parameters??  Here is the code I'm using:
Thank you!!

swagger: '2.0'
info:
  version: 0.0.0
  title: Simple API
paths:
  /:
get:
  parameters:
- name: passengers
  in: query
  type: array
  items:
#$refs: '#/definitions/pax'
type: string 

  responses:
200:
  description: OK

definitions:
  pax:
type: object
properties:
  name:
type: string
  familyname:
type: string

-- 
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: New Swagger libraries for Clojure

2016-09-06 Thread wing328
You will need to submit a PR, similar to this 
one: https://github.com/swagger-api/swagger.io/pull/124

William

Oliver Hine於 2016年9月2日星期五 UTC+8上午12時18分25秒寫道:
>
> Hi all,
>
> I thought I'd let you all know about a couple of libraries I've been 
> working on in Clojure.
>
> *pedestal-api*
> A library for building APIs on the pedestal web server. It implements the 
> parts of HTTP that are useful for APIs and allows you to document your 
> handlers and middleware using idiomatic Clojure and generate a compliant 
> Swagger specification.
> Note that this replaces pedestal-swagger (now known as route-swagger) 
> https://github.com/frankiesardo/route-swagger which was de-scoped to 
> focus on a more generic approach (it's still worth checking out).
> https://github.com/oliyh/pedestal-api
>
> *martian*
>
> An extensible client for Clojure and Clojurescript which bootstraps itself 
> using a Swagger definition and includes middleware for efficient 
> (de)serialisation, stub testing and more. APIs can be explored and 
> endpoints called using idiomatic Clojure with implementations provided for 
> the most popular HTTP libraries for both the browser and the server.
>
> https://github.com/oliyh/martian
>
>
> I hope they are useful to Clojurians out there.
>
>
> Does anyone know how to request their listing on the community tools page?
>
>
> Cheers
>
> Oliy
>

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


Customize swagger paths

2016-09-06 Thread avinash . upadhya28
Hi Folks,

I have a servlet which redirects to a appropriate REST resource based on 
input parameter. So i have annotated all my resource methods 
with @ApiOperation. But its taking the method name for creating the 
Resource path.I wanted it to take the Servlet path as the resource path. 

Can any one please let me know how can i customize this path name. I am 
using the Swagger-servlet module.  

Please let me know if anything is not clear above.

Regards,

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