ifeelgoods/apipie-rails — pull request #1 by mourad-ifeelgoods (2014-06-25 14:10:07+00:00)
Title: Topic revamp array validator

Introduce a new ApiPie Array validator for more flexible validations
The following validation are currently supported
* Validates all items of an array has the specified type
* Validates all items are in a set of values

**exemple 1**
Assert `hits` must be an array of integer value
```ruby
param :hits, Array, of: Integer
```

**exemple 2**
Assert each items of `colors` to be in the enumeration
```ruby
param :colors, Array, enum: [ "red", "green", "blue"]
````

**exemple 3**
The load of enum can be deferred until needed. this useful when the enum may changes
```ruby
param :colors, Array, enum: -> { Color.all.pluck(:name) }
````

**exemple 4**
Assert `things` is an array of any type
```ruby
param :things, Array
````