we're struggling describing an array of any size in our API. Using API Blueprint and MSON format for Dredd testing.
Endpoint /spots should return an array of "Spots" (those are objects). We don't know how many though. Currently we have only been able to make dredd validate the first spot of our array. Here is our blueprint :
FORMAT: 1A
HOST: http://host.com/
# Our API
## Spots [/spots{?type}]
### List All Spots [GET]
+ Parameters
+ type (optional, string) - a filter on the spot type
+ Response 200 (application/json)
+ Attributes (array)
- (Spot)
# Data Structures
## Spot(object, fixed-type)
- name: `Spot name` (string)
- code : `SPOT1` (string, required)
- type: `spotType` (string)
## Spots(array, fixed-type)
- Spot
If we remove fixed-type
in ## Spots(array, fixed-type)
then nothing is validated at all...
We need to tell him that all elements of Spots must be Spot but without restriction on how many there is.
Thanks for your help!