Skip to content

pocket7878/swagger_ui_engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwaggerUiEngine

Swagger UI mountable engine for rails.

Usage

Installation

Add this line to your application's Gemfile:

gem 'swagger_ui_engine'

And then execute:

$ bundle

Or install it yourself as:

$ gem install swagger_ui_engine

Then mount SwaggerUiEngine::Engine

# config/routes.rb
Rails.application.routes.draw do
  mount SwaggerUiEngine::Engine => "/swagger_ui_engine"
  # ...
end

Configuration

Specify swagger ui dist version & document file path

# 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")
end

License

The gem is available as open source under the terms of the MIT License.

About

SwaggerUI mountable engine for rails.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors