tim-vandecasteele/grape-swagger — pull request #12 by qwert666 (2012-08-22 22:53:05+00:00)
Title: quick bug fixes

## BUGS
* with parameters ( not getting params with underscore ex. category_id )

``` RUBY
"/foo/:bar_id/foobar".gsub(/:([a-z]+)/, '{\1}')
#=> /foo/{bar}_id/foobar
```
### FIX
``` RUBY
"/foo/:bar_id/foobar".gsub(/:(\w+)/, '{\1}')
#=> /foo/{bar_id}/foobar
```
---------------------------------------
* not getting proper resource when using version

``` RUBY
"/:version/foo/:bar_id/foobar".match('\/(.*?)[\.\/\(]').captures.first || '/'
#=> :version
```
### FIX
``` RUBY
"/:version/foo/:bar_id/foobar".match('^.:version.(\w+)').captures.first
#=> foo
```
---
* in "Swagger compatible API description" path is missing version

```
building
path": "/foo"
should
path: "v2/foo"
```
(just added options[:api_version] ) if version

the fixes are quite messy and without specs ... i will add them in a spare time