diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-03-07 13:37:50 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-03-07 13:37:50 +0000 |
commit | 1da5a103ace9c346758e9525d7f0fa55bab13599 (patch) | |
tree | 34a492ec3b0ec833556a728faf1ece5a8f060b47 /lib/api/entities.rb | |
parent | 7e7f260dc54c7643e8d7ec8bf3fbded3dfc06fcc (diff) | |
parent | dcdfa04b322db3905f6871a6857e7055c556547f (diff) | |
download | gitlab-ce-1da5a103ace9c346758e9525d7f0fa55bab13599.tar.gz |
Merge branch 'jprovazn-api' into 'master'
Add discussion API
See merge request gitlab-org/gitlab-ce!17510
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index f39906270d8..4555184095c 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -644,6 +644,7 @@ module API NOTEABLE_TYPES_WITH_IID = %w(Issue MergeRequest).freeze expose :id + expose :type expose :note, as: :body expose :attachment_identifier, as: :attachment expose :author, using: Entities::UserBasic @@ -655,6 +656,12 @@ module API expose(:noteable_iid) { |note| note.noteable.iid if NOTEABLE_TYPES_WITH_IID.include?(note.noteable_type) } end + class Discussion < Grape::Entity + expose :id + expose :individual_note?, as: :individual_note + expose :notes, using: Entities::Note + end + class AwardEmoji < Grape::Entity expose :id expose :name |