Commit ecf53bb9e616b724bafc939d5e74744e774e3fd2

Authored by Sebastian Ziebell
1 parent 3374027e

API: fixes project creation and removed redundant info

doc/api/repositories.md
... ... @@ -217,8 +217,6 @@ Parameters:
217 217  
218 218 + `id` (required) - The ID of a project
219 219 + `ref_name` (optional) - The name of a repository branch or tag or if not given the default branch
220   -+ `page`(optional) - The page with the commits (pagination)
221   -+ `per_page` (optional) - The number of commits per page (pagination)
222 220  
223 221 ```json
224 222 [
... ...
lib/api/groups.rb
... ... @@ -6,9 +6,6 @@ module Gitlab
6 6 resource :groups do
7 7 # Get a groups list
8 8 #
9   - # Parameters
10   - # page (optional) - The page number of the groups list
11   - # per_page (optional) - The number of elements per page
12 9 # Example Request:
13 10 # GET /groups
14 11 get do
... ...
lib/api/projects.rb
... ... @@ -42,6 +42,7 @@ module Gitlab
42 42 # wall_enabled (optional) - enabled by default
43 43 # merge_requests_enabled (optional) - enabled by default
44 44 # wiki_enabled (optional) - enabled by default
  45 + # namespace_id (optional) - defaults to user namespace
45 46 # Example Request
46 47 # POST /projects
47 48 post do
... ... @@ -52,7 +53,8 @@ module Gitlab
52 53 :issues_enabled,
53 54 :wall_enabled,
54 55 :merge_requests_enabled,
55   - :wiki_enabled]
  56 + :wiki_enabled,
  57 + :namespace_id]
56 58 @project = ::Projects::CreateContext.new(current_user, attrs).execute
57 59 if @project.saved?
58 60 present @project, with: Entities::Project
... ... @@ -360,8 +362,6 @@ module Gitlab
360 362 # Parameters:
361 363 # id (required) - The ID of a project
362 364 # ref_name (optional) - The name of a repository branch or tag, if not given the default branch is used
363   - # page (optional) - The page number of the commit pagination
364   - # per_page (optional) - The number of elements per page used in pagination
365 365 # Example Request:
366 366 # GET /projects/:id/repository/commits
367 367 get ":id/repository/commits" do
... ...