Swagger UI as Rails Engine for grape-swagger gem
Add this line to your application's Gemfile:
gem 'grape-swagger-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install grape-swagger-rails
mount GrapeSwaggerRails::Engine => '/swagger'
Create ./config/initializer/swagger.rb
with lines:
GrapeSwaggerRails.discoveryUrl = "/swagger_doc.json"
Чтобы избежать проблемы с валидацией параметров в POST
запросах, используе этот gem:
gem 'grape-swagger', :git=>'git://github.com/jhecking/grape-swagger.git'
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request