intridea/grape — pull request #207 by tim-vandecasteele (2012-07-20 13:42:39+00:00)
Title: Add support for Rack::Multipart::UploadedFile and don't care about parameter presence

When validating the type of a parameter, the validator shouldn't care if the value is nil (otherwise, only required parameters can be described).

Setting the type to an uploaded file was not possible, proposing this pull request as solution so you can define:

``` ruby
optional :dpx_file, :type => Rack::Multipart::UploadedFile, :desc => "the file to upload"
```

I think the implementation might be a bit hackish, but didn't see another way.