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
> *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
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
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": {
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:
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",