https://github.com/bsm/grape-apidoc
https://github.com/bsm/grape-apidoc
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bsm/grape-apidoc
- Owner: bsm
- License: apache-2.0
- Created: 2020-07-16T14:14:09.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T18:28:21.000Z (over 1 year ago)
- Last Synced: 2025-03-22T19:02:15.446Z (about 1 year ago)
- Language: Ruby
- Size: 37.1 KB
- Stars: 2
- Watchers: 4
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grape-apidoc [](https://github.com/bsm/grape-apidoc/actions/workflows/test.yml)
[Rake](https://github.com/ruby/rake) task to generate [Markdown](https://en.wikipedia.org/wiki/Markdown) documentation for [Grape](https://github.com/ruby-grape/grape)/[Grape::Entity](https://github.com/ruby-grape/grape-entity)-based APIs
## Getting started
```ruby
# Gemfile
group :development do # most common use env is env=development
gem 'grape-apidoc'
end
```
```ruby
# Rakefile
begin
require 'grape/apidoc'
Grape::Apidoc::RakeTask.new(:apidoc, root_api_class: Grape::App) # point it to the top-level API class
rescue LoadError
nil # so it does not fail in non-development environment
end
```
## Examples
- API: [spec/scenario/example.rb](spec/scenario/example.rb)
- Resulting doc: [spec/fixtures/example.md](spec/fixtures/example.md)