tim-vandecasteele/grape-swagger — pull request #114 by dspaeth-faber (2014-07-09 11:47:08+00:00)
Title: added a look up for nested presenters

When you expose a property with a presenter like this:

```ruby
expose :links, using: Link, :documentation => { type: 'array', items: {'$ref' => 'link'} }
```
The Link entity does not apear in the documentation unless you use it direktly for another action.
With this PR directly used presenters (not recursivly) are looked up and used.

Furthor more I did change parse_entity_name to use ```instance_variable_get(:@root) ```
because the property name must match my $ref entry. When you dont change this
the shown model name can differ from the linked one. Example:

```ruby
module API
class Link < Grape::Entity
root 'links', 'link'
end
end
```

Would be displayed as "link" for the Modelname, but I have to define

```ruby
expose :links, using: Link, :documentation => { type: 'array', items: {'$ref' => 'API::Link'} }
```

And swagger would display the property like this:

links (array[API::Link], optional)