Giter Site home page Giter Site logo

grape-docs's Introduction

grape-docs

Automatically generate markdown documentation from your grape API

Description

grape-docs automagically generates documentation for your Grape API in various formats.

The Gem will automatically analyze your Grape API structure, mounts, namespaces and routes, and will build a markdown documentation in separate files.

It's best used combined with GitBook and gitbook-plugin-api to transform your markdown documentation into a good-looking and browsable API navigation.

Installation

Install globally using gem install grape-docs or include it in your project Gemfile:

source 'http://rubygems.org'

gem 'grape-docs'

Usage

Run the grape-docs export command to export your documentation from within your Grape API project directory:

Usage:
  grape-docs export <api_name> <export_path>

Arguments:
  <api_name>                 # Constant name of your Grape API, e.g. MyApp::Api
  <export_path>              # Directory / path where the markdown documentation will be generated in

Options:
  -h, [--host=HOST]          # API Host
                             # Default: https://api.example.com/
  -t, [--template=TEMPLATE]  # Markdown template (default, gitbook) or custom (requires .md.erb extension)
                             # Default: default
  -r, [--require=REQUIRE]    # Ruby environment require path
                             # Default: config/environment.rb

Export documentation of API named <api_name> to <export_path> directory

Result

Template default Template gitbook
default gitbook

License

grape-docs is available under an MIT-style license.

grape-docs's People

Contributors

tobiasstrebitzer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

grape-docs's Issues

How to generate response?

Hi,

Thanks for the tool!
I couldn't find a way to exemplify the response using grape-docs.
Maybe if you also included the example grape app you used to generate the documentation under the ./examples dir it would be easier for people to figure how to correctly use this tool.

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.