Name: swagger_engine
Owner: Stembolt
Description: Mountable Swagger
Forked from: batdevis/swagger_engine
Created: 2017-03-17 22:22:07.0
Updated: 2017-03-17 22:23:46.0
Pushed: 2017-03-20 17:24:54.0
Size: 2879
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Include swagger-ui as rails engine.
https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md
Add to Gemfile
to your config/routes.rb
enticate :user do
unt SwaggerEngine::Engine, at: "/api-docs"
or
enticate :user, lambda { |u| u.admin? } do
unt SwaggerEngine::Engine, at: "/api-docs"
Set username and password in config/initializers/swagger_engine.rb
:
gerEngine.configure do |config|
nfig.admin_username = ENV['ADMIN_USERNAME']
nfig.admin_password = ENV['ADMIN_PASSWORD']
Set the path of your json files in a initializer:
fig/initializers/swagger_engine.rb
gerEngine.configure do |config|
nfig.json_files = {
v1: "lib/swagger/swagger_v1.json",
v2: "lib/swagger/swagger_v2.json"
lib/swagger/
is a good place to place them..
Use Swagger editor.
This project rocks and uses MIT-LICENSE.