tim-vandecasteele/grape-swagger — pull request #46 by dblock (2013-06-25 16:10:50+00:00)
Title: Fix: translate parameter type to String, enables integration with things like Mongoid.

Mongoid defines something called a `field` that has a definition, including a `type`. That will be a class, such as `Boolean`. Grape-swagger builds a hash that includes `type: Boolean`. If you serialize this with JSON, it will recursively call `as_json`, and if you call `Boolean.to_json` you don't get a `String`, "Boolean", but you get a hash, `{}`. This breaks everything. Aside of fixing the problem, I think it's a good idea to force the type to always be a string, to avoid any hard to debug nested behavior.