summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 22afcb9edf2..1cc8fcb8408 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -308,6 +308,10 @@ module API
expose :additions, :deletions, :total
end
+ class CommitWithStats < Commit
+ expose :stats, using: Entities::CommitStats
+ end
+
class CommitDetail < Commit
expose :stats, using: Entities::CommitStats, if: :stats
expose :status
@@ -358,7 +362,7 @@ module API
end
class Snippet < Grape::Entity
- expose :id, :title, :file_name, :description
+ expose :id, :title, :file_name, :description, :visibility
expose :author, using: Entities::UserBasic
expose :updated_at, :created_at
expose :project_id
@@ -412,6 +416,10 @@ module API
expose :state, :created_at, :updated_at
expose :due_date
expose :start_date
+
+ expose :web_url do |milestone, _options|
+ Gitlab::UrlBuilder.build(milestone)
+ end
end
class IssueBasic < ProjectEntity