Commit 0533ae7e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #8464 from dserodio/group-api-description

Add description attribute to group API (GET and POST)
parents 57c121aa bb80bf36
...@@ -4,7 +4,7 @@ v 7.8.0 ...@@ -4,7 +4,7 @@ v 7.8.0
- Replace highlight.js with rouge-fork rugments (Stefan Tatschner) - Replace highlight.js with rouge-fork rugments (Stefan Tatschner)
- -
- -
- - Expose description in groups API
- -
- -
- -
......
...@@ -14,7 +14,8 @@ GET /groups ...@@ -14,7 +14,8 @@ GET /groups
"id": 1, "id": 1,
"name": "Foobar Group", "name": "Foobar Group",
"path": "foo-bar", "path": "foo-bar",
"owner_id": 18 "owner_id": 18,
"description": "An interesting group"
} }
] ]
``` ```
...@@ -45,6 +46,7 @@ Parameters: ...@@ -45,6 +46,7 @@ Parameters:
- `name` (required) - The name of the group - `name` (required) - The name of the group
- `path` (required) - The path of the group - `path` (required) - The path of the group
- `description` (optional) - The group's description
## Transfer project to group ## Transfer project to group
......
...@@ -65,7 +65,7 @@ module API ...@@ -65,7 +65,7 @@ module API
end end
class Group < Grape::Entity class Group < Grape::Entity
expose :id, :name, :path, :owner_id expose :id, :name, :path, :owner_id, :description
end end
class GroupDetail < Group class GroupDetail < Group
......
...@@ -47,7 +47,7 @@ module API ...@@ -47,7 +47,7 @@ module API
authenticated_as_admin! authenticated_as_admin!
required_attributes! [:name, :path] required_attributes! [:name, :path]
attrs = attributes_for_keys [:name, :path] attrs = attributes_for_keys [:name, :path, :description]
@group = Group.new(attrs) @group = Group.new(attrs)
@group.owner = current_user @group.owner = current_user
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment