Closed stcrestrada closed 8 years ago
Your body parameter schema is an object, and Swagger Editor is showing it correctly. It should not have brackets around, when the schema in not an array.
If you want to have an array of Person objects you can use type:array and set items: to the Person.
There seems to be a confusion here. The body of the request is described as an object, and the response is described as an array. You're describing that you're taking the response you get from the operation and try to use it for the body - obviously, that's not going to work.
@stcrestrada - does this explain the problem?
I don't see any issue in swagger-editor 2.10.1:
Closing this due to lack of activity. @stcrestrada please reopen if still relevant.
I am currently using the latest swagger-editor version (forked a few days ago).
I am getting an error when I try to post my response in the swagger editor, "Malformed JSON", I have a hunch as to why this is happening. When I submit data on swagger-ui the json appears like this in the body:
and I've had success on swagger-ui, but in swagger-editor preview my json appears w/o the brackets like so:
My Swagger
I want to format my json like the former json I pasted above; however, I am uncertain how I can achieve this, since my yaml file did not change from swagger-ui to swagger-editor