summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-08-27 19:47:00 +0000
committerStan Hu <stanhu@gmail.com>2019-08-27 13:28:00 -0700
commit5e0378b31105c88fe05962736921b72bf40a67b3 (patch)
tree1bb40014af85c250ba7ef35913c63f12069b995a
parenta58f4f00cf7cc8b4755d0d20094cbbd547d31d2b (diff)
downloadgitlab-ce-revert-79fa2cd9.tar.gz
Revert "Merge branch 'nik-api-snippets-fix' into 'master'"revert-79fa2cd9
This reverts merge request !28571
-rw-r--r--doc/api/snippets.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/api/snippets.md b/doc/api/snippets.md
index 1ce0b1e7a62..f90447e124e 100644
--- a/doc/api/snippets.md
+++ b/doc/api/snippets.md
@@ -165,15 +165,15 @@ Parameters:
|:--------------|:-------|:---------|:---------------------------------------------------|
| `title` | string | yes | Title of a snippet. |
| `file_name` | string | yes | Name of a snippet file. |
-| `code` | string | yes | Content of a snippet. |
+| `content` | string | yes | Content of a snippet. |
| `description` | string | no | Description of a snippet. |
-| `visibility` | string | yes | Snippet's [visibility](#snippet-visibility-level). |
+| `visibility` | string | no | Snippet's [visibility](#snippet-visibility-level). |
Example request:
```sh
curl --request POST \
- --data '{"title": "This is a snippet", "code": "Hello world", "description": "Hello World snippet", "file_name": "test.txt", "visibility": "internal" }' \
+ --data '{"title": "This is a snippet", "content": "Hello world", "description": "Hello World snippet", "file_name": "test.txt", "visibility": "internal" }' \
--header 'Content-Type: application/json' \
--header "PRIVATE-TOKEN: valid_api_token" \
https://gitlab.example.com/api/v4/snippets
@@ -222,14 +222,14 @@ Parameters:
| `title` | string | no | Title of a snippet. |
| `file_name` | string | no | Name of a snippet file. |
| `description` | string | no | Description of a snippet. |
-| `code` | string | no | Content of a snippet. |
+| `content` | string | no | Content of a snippet. |
| `visibility` | string | no | Snippet's [visibility](#snippet-visibility-level). |
Example request:
```sh
curl --request PUT \
- --data '{"title": "foo", "code": "bar"}' \
+ --data '{"title": "foo", "content": "bar"}' \
--header 'Content-Type: application/json' \
--header "PRIVATE-TOKEN: valid_api_token" \
https://gitlab.example.com/api/v4/snippets/1