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
- Replace highlight.js with rouge-fork rugments (Stefan Tatschner)
-
-
-
- Expose description in groups API
-
-
-
......
......@@ -14,7 +14,8 @@ GET /groups
"id": 1,
"name": "Foobar Group",
"path": "foo-bar",
"owner_id": 18
"owner_id": 18,
"description": "An interesting group"
}
]
```
......@@ -45,6 +46,7 @@ Parameters:
- `name` (required) - The name of the group
- `path` (required) - The path of the group
- `description` (optional) - The group's description
## Transfer project to group
......
......@@ -65,7 +65,7 @@ module API
end
class Group < Grape::Entity
expose :id, :name, :path, :owner_id
expose :id, :name, :path, :owner_id, :description
end
class GroupDetail < Group
......
......@@ -47,7 +47,7 @@ module API
authenticated_as_admin!
required_attributes! [:name, :path]
attrs = attributes_for_keys [:name, :path]
attrs = attributes_for_keys [:name, :path, :description]
@group = Group.new(attrs)
@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