Commit 931ec399bd16321f5bdd8e745f2f87dfe25a83ac
1 parent
b510f8c4
Exists in
master
and in
4 other branches
Remove the code parameter from the projects API
Showing
3 changed files
with
1 additions
and
6 deletions
Show diff stats
doc/api/projects.md
@@ -10,7 +10,6 @@ GET /projects | @@ -10,7 +10,6 @@ GET /projects | ||
10 | [ | 10 | [ |
11 | { | 11 | { |
12 | "id": 3, | 12 | "id": 3, |
13 | - "code": "rails", | ||
14 | "name": "rails", | 13 | "name": "rails", |
15 | "description": null, | 14 | "description": null, |
16 | "path": "rails", | 15 | "path": "rails", |
@@ -32,7 +31,6 @@ GET /projects | @@ -32,7 +31,6 @@ GET /projects | ||
32 | }, | 31 | }, |
33 | { | 32 | { |
34 | "id": 5, | 33 | "id": 5, |
35 | - "code": "gitlab", | ||
36 | "name": "gitlab", | 34 | "name": "gitlab", |
37 | "description": null, | 35 | "description": null, |
38 | "path": "gitlab", | 36 | "path": "gitlab", |
@@ -70,7 +68,6 @@ Parameters: | @@ -70,7 +68,6 @@ Parameters: | ||
70 | ```json | 68 | ```json |
71 | { | 69 | { |
72 | "id": 5, | 70 | "id": 5, |
73 | - "code": "gitlab", | ||
74 | "name": "gitlab", | 71 | "name": "gitlab", |
75 | "description": null, | 72 | "description": null, |
76 | "path": "gitlab", | 73 | "path": "gitlab", |
@@ -103,7 +100,6 @@ POST /projects | @@ -103,7 +100,6 @@ POST /projects | ||
103 | Parameters: | 100 | Parameters: |
104 | 101 | ||
105 | + `name` (required) - new project name | 102 | + `name` (required) - new project name |
106 | -+ `code` (optional) - new project code, uses project name if not set | ||
107 | + `path` (optional) - new project path, uses project name if not set | 103 | + `path` (optional) - new project path, uses project name if not set |
108 | + `description` (optional) - short project description | 104 | + `description` (optional) - short project description |
109 | + `default_branch` (optional) - 'master' by default | 105 | + `default_branch` (optional) - 'master' by default |
lib/api/entities.rb
@@ -18,7 +18,7 @@ module Gitlab | @@ -18,7 +18,7 @@ module Gitlab | ||
18 | end | 18 | end |
19 | 19 | ||
20 | class Project < Grape::Entity | 20 | class Project < Grape::Entity |
21 | - expose :id, :code, :name, :description, :path, :default_branch | 21 | + expose :id, :name, :description, :path, :default_branch |
22 | expose :owner, using: Entities::UserBasic | 22 | expose :owner, using: Entities::UserBasic |
23 | expose :private_flag, as: :private | 23 | expose :private_flag, as: :private |
24 | expose :issues_enabled, :merge_requests_enabled, :wall_enabled, :wiki_enabled, :created_at | 24 | expose :issues_enabled, :merge_requests_enabled, :wall_enabled, :wiki_enabled, :created_at |
lib/api/projects.rb
@@ -27,7 +27,6 @@ module Gitlab | @@ -27,7 +27,6 @@ module Gitlab | ||
27 | # | 27 | # |
28 | # Parameters: | 28 | # Parameters: |
29 | # name (required) - name for new project | 29 | # name (required) - name for new project |
30 | - # code (optional) - code for new project, uses project name if not set | ||
31 | # path (optional) - path for new project, uses project name if not set | 30 | # path (optional) - path for new project, uses project name if not set |
32 | # description (optional) - short project description | 31 | # description (optional) - short project description |
33 | # default_branch (optional) - 'master' by default | 32 | # default_branch (optional) - 'master' by default |