Commit 931ec399bd16321f5bdd8e745f2f87dfe25a83ac

Authored by Riyad Preukschas
1 parent b510f8c4

Remove the code parameter from the projects API

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