Re: how to write the swagger definition for json response

2017-02-24 Thread Bart Geens
thanks tony, it makes sense. i understand now, and by providing your answer you showed me another feature i did not know yet: example values great!, but in http://petstore.swagger.io/#!/pet/findPetsByTags I can see the example values with the example you provided (in the editor) I cant? when i us

Re: how to write the swagger definition for json response

2017-02-23 Thread Abdullah Mourad
> *Date: *Thursday, 23 February 2017 at 11:20 > *To: *Swagger > *Subject: *Re: how to write the swagger definition for json response > > > > On a related note... What would one do if the spec did not match the > returned object. Is there any way to map between

Re: how to write the swagger definition for json response

2017-02-23 Thread Ron Ratovsky
t 11:20 To: Swagger Subject: Re: how to write the swagger definition for json response On a related note... What would one do if the spec did not match the returned object. Is there any way to map between the two, rather than write the spec to match the object? Let's say you have

Re: how to write the swagger definition for json response

2017-02-23 Thread Abdullah Mourad
On a related note... What would one do if the spec did not match the returned object. Is there any way to map between the two, rather than write the spec to match the object? Let's say you have "definitions": { "Foo": { "properties": { "projectName": {

Re: how to write the swagger definition for json response

2017-02-23 Thread tony tam
I suggest you try out the http://editor.swagger.io to experiment with the specification. But here’s how it could be done: # as a single inline object definition definitions: YourResponse: type: object properties: Data: type: object properties: Login:

how to write the swagger definition for json response

2017-02-23 Thread BG
Hi, I have this rather simple json response, in my swagger file I want to write the definition that matches the response. I got stuck - probably because because I am new to swagger. so at the end of the example below i want the definition for this json response {"Data":{"Login":[{"name":"Doe",