diff options
author | Achilleas Pipinellis <axilleas@axilleas.me> | 2016-08-01 16:21:03 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2016-08-01 16:21:03 +0000 |
commit | 3c096e982d71dc7b0fadb0df9afecb925ba6cbd6 (patch) | |
tree | aacad9bd4a7db36ce03b178494fceeb6dcca1258 | |
parent | a0788fc34e868e8d4e378db4a181e109f22603cb (diff) | |
parent | 8bcdc4b185d70bfb2a50d22ec99a26c2c463a2f8 (diff) | |
download | gitlab-ce-3c096e982d71dc7b0fadb0df9afecb925ba6cbd6.tar.gz |
Merge branch 'document-grape-dsl' into 'master'
API methods should be documented using Grape's DSL
## What does this MR do?
Document that we should now document API methods using Grape DSL too.
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2397#note_13491048 for the discussion.
See merge request !5594
-rw-r--r-- | doc/development/doc_styleguide.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index 6ee7b3cfeeb..3a3597bccaa 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -244,6 +244,12 @@ In this case: Here is a list of must-have items. Use them in the exact order that appears on this document. Further explanation is given below. +- Every method must be described using [Grape's DSL](https://github.com/ruby-grape/grape/tree/v0.13.0#describing-methods) + (see https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/environments.rb + for a good example): + - `desc` for the method summary (you can pass it a block for additional details) + - `params` for the method params (this acts as description **and** validation + of the params) - Every method must have the REST API request. For example: ``` |