Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-08-22 11:31:02 +0300
committerSean McGivern <sean@mcgivern.me.uk>2018-08-22 11:31:02 +0300
commit0ce1355273a2f9158d700badb6f9ac1b30fd26e7 (patch)
tree18017b2bb96bcb655e85aa9699a79a77332b55e8 /lib/api
parente922750e89fde40d9f3c465d7b1f380943c464e3 (diff)
parent72b5c9af62be8d2b5531077e09517b09be189539 (diff)
Merge branch 'api-empty-project-snippets' into 'master'
Api empty project snippets Closes #50270 See merge request gitlab-org/gitlab-ce!21325
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/project_snippets.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/project_snippets.rb b/lib/api/project_snippets.rb
index 1de5551fee9..0ada0ef4708 100644
--- a/lib/api/project_snippets.rb
+++ b/lib/api/project_snippets.rb
@@ -49,7 +49,7 @@ module API
params do
requires :title, type: String, desc: 'The title of the snippet'
requires :file_name, type: String, desc: 'The file name of the snippet'
- requires :code, type: String, desc: 'The content of the snippet'
+ requires :code, type: String, allow_blank: false, desc: 'The content of the snippet'
optional :description, type: String, desc: 'The description of a snippet'
requires :visibility, type: String,
values: Gitlab::VisibilityLevel.string_values,
@@ -78,7 +78,7 @@ module API
requires :snippet_id, type: Integer, desc: 'The ID of a project snippet'
optional :title, type: String, desc: 'The title of the snippet'
optional :file_name, type: String, desc: 'The file name of the snippet'
- optional :code, type: String, desc: 'The content of the snippet'
+ optional :code, type: String, allow_blank: false, desc: 'The content of the snippet'
optional :description, type: String, desc: 'The description of a snippet'
optional :visibility, type: String,
values: Gitlab::VisibilityLevel.string_values,