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/v3
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-02-21 17:12:32 +0300
committerJarka Kadlecova <jarka@gitlab.com>2017-02-27 09:55:45 +0300
commit08ee177d6f247d1f8aa43a91e89469434526aabe (patch)
treef6ccd578b2abb5c49be06d69a17d99775a768a87 /lib/api/v3
parent90040620cba77620a57e028d25e6148c72494fbd (diff)
API project create: Make name or path required
Diffstat (limited to 'lib/api/v3')
-rw-r--r--lib/api/v3/projects.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/v3/projects.rb b/lib/api/v3/projects.rb
index c3821555452..23d4a692477 100644
--- a/lib/api/v3/projects.rb
+++ b/lib/api/v3/projects.rb
@@ -172,8 +172,9 @@ module API
success ::API::Entities::Project
end
params do
- requires :name, type: String, desc: 'The name of the project'
+ optional :name, type: String, desc: 'The name of the project'
optional :path, type: String, desc: 'The path of the repository'
+ at_least_one_of :name, :path
use :optional_params
use :create_params
end