Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/tree_object.rb')
-rw-r--r--lib/api/entities/tree_object.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/api/entities/tree_object.rb b/lib/api/entities/tree_object.rb
index e4e840ebe43..1f542885169 100644
--- a/lib/api/entities/tree_object.rb
+++ b/lib/api/entities/tree_object.rb
@@ -3,9 +3,12 @@
module API
module Entities
class TreeObject < Grape::Entity
- expose :id, :name, :type, :path
+ expose :id, documentation: { example: 'a1e8f8d745cc87e3a9248358d9352bb7f9a0aeba' }
+ expose :name, documentation: { example: 'html' }
+ expose :type, documentation: { example: 'tree' }
+ expose :path, documentation: { example: 'files/html' }
- expose :mode do |obj, options|
+ expose :mode, documentation: { example: '040000' } do |obj, options|
filemode = obj.mode
filemode = "0" + filemode if filemode.length < 6
filemode