summaryrefslogtreecommitdiff
path: root/lib/api/entities
diff options
context:
space:
mode:
authorSteve Abrams <sabrams@gitlab.com>2019-08-05 20:00:50 +0000
committerMayra Cabrera <mcabrera@gitlab.com>2019-08-05 20:00:50 +0000
commit3dbf3997bbf51eca8a313c4e152c77c1b038fd5d (patch)
treef6da1d92978e97c53ee951e5b05f9cdbee057efa /lib/api/entities
parente9918b1a949f478f42ebf8daee04cd0cb08977be (diff)
downloadgitlab-ce-3dbf3997bbf51eca8a313c4e152c77c1b038fd5d.tar.gz
Add group level container repository endpoints
API endpoints for requesting container repositories and container repositories with their tag information are enabled for users that want to specify the group containing the repository rather than the specific project.
Diffstat (limited to 'lib/api/entities')
-rw-r--r--lib/api/entities/container_registry.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/api/entities/container_registry.rb b/lib/api/entities/container_registry.rb
index 00833ca7480..6250f35c7cb 100644
--- a/lib/api/entities/container_registry.rb
+++ b/lib/api/entities/container_registry.rb
@@ -3,18 +3,20 @@
module API
module Entities
module ContainerRegistry
- class Repository < Grape::Entity
- expose :id
+ class Tag < Grape::Entity
expose :name
expose :path
expose :location
- expose :created_at
end
- class Tag < Grape::Entity
+ class Repository < Grape::Entity
+ expose :id
expose :name
expose :path
+ expose :project_id
expose :location
+ expose :created_at
+ expose :tags, using: Tag, if: -> (_, options) { options[:tags] }
end
class TagDetails < Tag