Git Product home page Git Product logo

raddocs's Introduction

Travis status Inline Docs

Raddocs

Raddocs is a browser for JSON outputted by the rspec_api_documentation gem.

Install

Gemfile

gem 'raddocs'

config/routes.rb

  mount Raddocs::App => "/docs"

Make sure RspecApiDocumentation is generating JSON:

spec/spec_helper.rb

RspecApiDocumentation.configure do |config|
  config.format = :json
end

Configuration

  • api_name - Name of the API on the example index page
  • docs_dir - where the JSON output from rspec_api_documentation is located
  • docs_mime_type - if you use the middleware, what mime type are you serving your docs as, must be a regex. eg: /text\/vnd.org.oestrich.raddocs\+plain/
  • include_bootstrap - Boolean to disable including bootstrap if you are using your own css
  • external_css - Array of css files to include, with a full URL to them
  • url_prefix - Optional prefix to insert before URLs generated by Raddocs
  • index_view - Optional configuration to change the view of index page to tabular format with navbar header by setting value as tabular. Requires latest rspec_api_documentation gem. Changes display link to Http method + Route Url. eg: GET /api/orders
Raddocs.configure do |config|
  config.docs_dir = "doc/api"
end

Custom CSS

You can include extra css by the config option external_css or add a directory to the docs dir named styles. Every css file in the styles dir will be included as a link element on all pages.

raddocs's People

Contributors

danivovich avatar dbryand avatar lanej avatar michaelthies avatar oestrich avatar rawsyntax avatar samwgoldman avatar tyrauber avatar

Watchers

 avatar  avatar

Forkers

simplysmarttech

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.