tim-vandecasteele/grape-swagger — pull request #172 by grzesiek (2014-11-12 13:32:51+00:00)
Title: Fix problem with using prefix name somewhere in api paths

Hi.

I've encountered problem with generating documentation when I used prefix string somewhere is API path.
For example, you can use `prefix :api ` and use

```ruby
get :apitest do
"test api"
end
```

Generated path for this, is, for example, `/api/something/apitest`.

The problem is when in
```ruby
route_match = route.route_path.split(route.route_prefix).last.match('\/([\w|-]*?)[\.\/\(]')
```
`route_path` is spitted incorrectly because second "api" is also matched.

My solutions changes this code to match only first `route_prefix` occurrence (greedy RegExp). This is quick solution, and probably needs deeper investigation. It also fixes problem with

```ruby
grape-swagger-0.8.0/lib/grape-swagger.rb:20:in `split': wrong argument type Symbol (expected Regexp) (TypeError)
```
what happens when prefix is a Symbol.

Kind regards,
Grzegorz