Swagger UI mountable engine for rails.
Add this line to your application's Gemfile:
gem 'swagger_ui_engine'And then execute:
$ bundleOr install it yourself as:
$ gem install swagger_ui_engineThen mount SwaggerUiEngine::Engine
# config/routes.rb
Rails.application.routes.draw do
mount SwaggerUiEngine::Engine => "/swagger_ui_engine"
# ...
end# config/initializers/swagger_ui_engine.rb
SwaggerUiEngine.configure do |config|
config.swagger_ui_version = "3.25.0" // default is `nil` to use latest version.
config.openapi_file_path = Rails.root.join("docs/openapi.yaml")
endThe gem is available as open source under the terms of the MIT License.