Re: unique operationId

2016-09-27 Thread jmls
gt;>> This brings me back to the original point: if I have 2 models, Customer >>> and Order, and they each have a "find" method, I would like the sdk to >>> be >>> >>> Customer.find() and Order.find() >>> >>> At the mome

Re: unique operationId

2016-09-27 Thread tony tam
>> Customer.find() and Order.find() >> >> At the moment, because the operationId is Customer_find and Order_find, the >> actual method names are >> >> Customer.CustomerFind() and Order.OrderFind() which looks ugly >> >> if I used guid1 and guid2

Re: unique operationId

2016-09-27 Thread jmls
ch have a "find" method, I would like the sdk to be >> >> Customer.find() and Order.find() >> >> At the moment, because the operationId is Customer_find and Order_find, >> the actual method names are >> >> Customer.CustomerFind() and Order.OrderFind() whic

Re: unique operationId

2016-09-27 Thread jmls
Customer_find and Order_find, > the actual method names are > > Customer.CustomerFind() and Order.OrderFind() which looks ugly > > if I used guid1 and guid2 as the operationids, then the models are > Customer.guid1() > and Order.guid2() which is also ugly ;) > > Is ther

Re: unique operationId

2016-09-27 Thread tony tam
merFind() and Order.OrderFind() which looks ugly > > if I used guid1 and guid2 as the operationids, then the models are > Customer.guid1() and Order.guid2() which is also ugly ;) > > Is there an "alias" or "methodname" property in the spec that would allow me >

Re: unique operationId

2016-09-27 Thread jmls
names are Customer.CustomerFind() and Order.OrderFind() which looks ugly if I used guid1 and guid2 as the operationids, then the models are Customer.guid1() and Order.guid2() which is also ugly ;) Is there an "alias" or "methodname" property in the spec that would allow me to have a un

Re: unique operationId

2016-09-27 Thread tony tam
Hi, indeed you can use numbers or a guid. Just keep in mind that tooling (swagger-ui or codegen) may need to coerce that string to something appropriate (i.e. you can’t typically have hyphens in a method name for client SDKs). Also… since that field is optional you can choose to not supply it at

Re: unique operationId

2016-09-27 Thread jmls
thanks for the reply, Tony can I just clarify something : you said " *you should have unique numbers for all operationId values*" , so does that mean a guid / uuid would be acceptable ? If so, how do you *name* the endpoint ? This is perhaps where my confusion is coming from. I completely under

Re: unique operationId

2016-09-26 Thread tony tam
Hi, you should have unique numbers for all operationId values. If the tools work, it doesn’t make it right—it just means they’re being lenient. They could throw errors but the authors have decided to gracefully handle the error in the spec. > On Sep 24, 2016, at 11:05 AM, jmls wrote: > > He

unique operationId

2016-09-24 Thread jmls
Hey all Been looking through the v2 specification (http://swagger.io/specification/) , and came across this statement: *operationId: Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uni