From 931ec399bd16321f5bdd8e745f2f87dfe25a83ac Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Fri, 21 Dec 2012 18:43:46 +0100 Subject: [PATCH] Remove the code parameter from the projects API --- doc/api/projects.md | 4 ---- lib/api/entities.rb | 2 +- lib/api/projects.rb | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/doc/api/projects.md b/doc/api/projects.md index c8cb263..42c20ff 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -10,7 +10,6 @@ GET /projects [ { "id": 3, - "code": "rails", "name": "rails", "description": null, "path": "rails", @@ -32,7 +31,6 @@ GET /projects }, { "id": 5, - "code": "gitlab", "name": "gitlab", "description": null, "path": "gitlab", @@ -70,7 +68,6 @@ Parameters: ```json { "id": 5, - "code": "gitlab", "name": "gitlab", "description": null, "path": "gitlab", @@ -103,7 +100,6 @@ POST /projects Parameters: + `name` (required) - new project name -+ `code` (optional) - new project code, uses project name if not set + `path` (optional) - new project path, uses project name if not set + `description` (optional) - short project description + `default_branch` (optional) - 'master' by default diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 070fbad..92245a9 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -18,7 +18,7 @@ module Gitlab end class Project < Grape::Entity - expose :id, :code, :name, :description, :path, :default_branch + expose :id, :name, :description, :path, :default_branch expose :owner, using: Entities::UserBasic expose :private_flag, as: :private expose :issues_enabled, :merge_requests_enabled, :wall_enabled, :wiki_enabled, :created_at diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 044a627..2e14095 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -27,7 +27,6 @@ module Gitlab # # Parameters: # name (required) - name for new project - # code (optional) - code for new project, uses project name if not set # path (optional) - path for new project, uses project name if not set # description (optional) - short project description # default_branch (optional) - 'master' by default -- libgit2 0.21.2