summaryrefslogtreecommitdiff
path: root/app/serializers/tree_root_entity.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/tree_root_entity.rb')
-rw-r--r--app/serializers/tree_root_entity.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/serializers/tree_root_entity.rb b/app/serializers/tree_root_entity.rb
new file mode 100644
index 00000000000..23b65aa4a4c
--- /dev/null
+++ b/app/serializers/tree_root_entity.rb
@@ -0,0 +1,8 @@
+# TODO: Inherit from TreeEntity, when `Tree` implements `id` and `name` like `Gitlab::Git::Tree`.
+class TreeRootEntity < Grape::Entity
+ expose :path
+
+ expose :trees, using: TreeEntity
+ expose :blobs, using: BlobEntity
+ expose :submodules, using: SubmoduleEntity
+end