diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-02-28 08:48:23 +0100 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-03-07 12:27:50 +0100 |
commit | dcdfa04b322db3905f6871a6857e7055c556547f (patch) | |
tree | b3d006e8410b7182c63bfd620b99a71392c77aff /lib/api/entities.rb | |
parent | 8a0052c037f025b64159ca8cfe0d3451261c1edb (diff) | |
download | gitlab-ce-jprovazn-api.tar.gz |
Add discussion APIjprovazn-api
* adds basic discussions API for issues and snippets
* reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
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 0c8ec7dd5f5..aa96033898b 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -629,6 +629,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 @@ -640,6 +641,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 |