tim-vandecasteele/grape-swagger — pull request #61 by binarycleric (2013-09-19 16:01:05+00:00)
Title: Added formatting options to swagger metadata

Trying to use the current version of grape-swagger with swagger-ui resulted in some headaches because by default grape-swagger generates API meta-data in XML but swagger-ui and the rest of our APIs at my organization are expecting JSON.

To solve this problem I added a section to setup options called `:formatting`. This hash can accept `:format`, `:default_format`, and `:default_error_formatter`. These options can be passed in when calling `add_swagger_documentation`.

Example

```ruby
add_swagger_documentation formatting: {format: :json,
default_format: :json,
default_error_formatter: :json}
```