I have Event data structure, and have GET Events method
## Event (object)
+ eventId : 1 (number, required) Id of event
+ name: Albuquerque Balloon Fiesta (string, required) Name of event
+ location: Albuquerque, NM (string, required) Location of event
...
### List All Events [GET /events]
+ Response 200 (application/json)
+ Attributes
+ events (array[Event])
Apiary will generate method documentation with one event in the response json. I'm wondering how I can hook Apiary to generate 10 events in the response. It would be very useful feature in order to make Mock server much closer to real implementation.
@AlexKorovyansky I agree with you. Until then you can workaround it by creating 10 data structures named Event1
... Event10
and use them.
You don't necessarily need to create 10 events, instead you could reference the same one multiple times:
## Events [/events]
### View [GET]
+ Response 200 (application/json)
+ Attributes (array)
+ (Event)
+ (Event)
+ name: Katie
+ (Event)
## Data Structures
### Event (object)
+ name: Kyle (string)
Thanks guys!
You don't necessarily need to create 10 events, instead you could reference the same one multiple times:
## Events [/events] ### View [GET] + Response 200 (application/json) + Attributes (array) + (Event) + (Event) + name: Katie + (Event) ## Data Structures ### Event (object) + name: Kyle (string)
I dont know how many times I tried to find out how I am supposed to do it exactly this way - to have an example for more than one entry in an array. Just a defined array with multiple examples in Blueprint. Thank you!
Most helpful comment
You don't necessarily need to create 10 events, instead you could reference the same one multiple times: