0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Wrapping redoc.min.js library with ruby gem for easy use in Rails projects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.9
~> 4.2
~> 10.0
 Project Readme

ReDoc-Rails

A Ruby Gem wrapper for the ReDoc OpenAPI Specification dynamic documentation project: https://github.com/Rebilly/ReDoc/.

Gem Version

Installation

Add this line to your application's Gemfile:

gem 'redoc-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install redoc-rails

Usage

Add this line to your application's assets/javascripts/application.js:

//= require ...
//= require redoc.min
//= require ...

Add the following to a web page:

  <redoc></redoc>

Add the following to the appropriate js/coffee file:

# Turbolinks 5
$(document).on 'turbolinks:load', ->
  Redoc.init('/swagger.yml', {})
  return

# vanilla JS
ready = ->
  Redoc.init('/swagger.yml', {})

$(document).ready(ready)
$(document).on('page:load', ready)

If you want detailed information on it usage, you can refer to original documentation.

https://github.com/Rebilly/ReDoc

Changelog

  • v1.22.2: bump, latest stable redoc plus update gems
  • v1.21.2: bump
  • v1.19.0: bump, stop shipping the unminified version to save space
  • v1.3.3 : bump
  • v1.3.2 : bump
  • v1.3.0 : initial version

Contributing

  1. Fork it ( https://github.com/[my-github-username]/redoc-rails/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request