batdevis/swagger_engine

Name: swagger_engine

Description: [LOOKING FOR MAINTAINER] swagger-ui as mountable rails engine

Created: 2015-05-11 14:54:09.0

Updated: 2017-12-10 08:29:36.0

Pushed: 2017-06-12 16:50:24.0

Homepage:

Size: 2187

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

LOOKING FOR MAINTAINER

I'm sorry but I can't maintain this project anymore.

If you want to maintain this project, contact me (batdevis[at]gmail.com) and I will transfer the ownership.

SwaggerEngine

Include swagger-ui as rails engine.

Current master works with Rails 4.0+. If you're looking for Rails 3.0 support, try version 0.0.3.

Swagger specifications

https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md

Install

Add to Gemfile

to your config/routes.rb
Protect your route
Devise
enticate :user do
unt SwaggerEngine::Engine, at: "/api-docs"

or

enticate :user, lambda { |u| u.admin? } do
unt SwaggerEngine::Engine, at: "/api-docs"

Basic http auth

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']

Configure
Json files

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..

Edit your json files

Use Swagger editor.

License

This project rocks and uses MIT-LICENSE.

Developed in collaboration with

Rawfish

Rawfish Logo


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.