sf_apidoc

0.0.6 • Public • Published

sf_apidoc_usage

Installation

npm install sf_apidoc -g

Example

=begin
@api {get} /user/:id Request User information
@apiParamExample {json} Request-Example:
file: test.json
=end
  • Then you must puth the test.json into test/fixtures dir, otherwise sf_apidoc can not find it.

Enhanced Commands

Below commands will support File when using sf_apidoc
  • @apiSuccessExample
  • @apiErrorExample
  • @apiHeaderExample
  • @apiExample
  • @apiParamExample

Generate API doc

  • Add below rake take into you Rails application
task :generate_apidoc do
    system "sf_apidoc -i . -o apidoc"
end

Then you can run bundle exec rake generate_apidoc to generate you api documentation.

More usage details please refer to apiDoc

Package Sidebar

Install

npm i sf_apidoc

Weekly Downloads

1

Version

0.0.6

License

MIT

Last publish

Collaborators

  • sf_zen