diff --git a/doc/api/container_registry.md b/doc/api/container_registry.md index e04f34cf4f49ad40f4668641a33cb5c569333882..3ba249099c223c85a72f5d556698f4f553bc802a 100644 --- a/doc/api/container_registry.md +++ b/doc/api/container_registry.md @@ -156,14 +156,6 @@ Example response: "location": "gitlab.example.com:5000/group/project", "created_at": "2019-01-10T13:38:57.391Z", "cleanup_policy_started_at": "2020-08-17T03:12:35.489Z", - "tags_count": 1, - "tags": [ - { - "name": "0.0.1", - "path": "group/project:0.0.1", - "location": "gitlab.example.com:5000/group/project:0.0.1" - } - ] }, { "id": 2, @@ -173,24 +165,6 @@ Example response: "location": "gitlab.example.com:5000/group/other_project", "created_at": "2019-01-10T13:39:08.229Z", "cleanup_policy_started_at": "2020-01-10T15:40:57.391Z", - "tags_count": 3, - "tags": [ - { - "name": "0.0.1", - "path": "group/other_project:0.0.1", - "location": "gitlab.example.com:5000/group/other_project:0.0.1" - }, - { - "name": "0.0.2", - "path": "group/other_project:0.0.2", - "location": "gitlab.example.com:5000/group/other_project:0.0.2" - }, - { - "name": "latest", - "path": "group/other_project:latest", - "location": "gitlab.example.com:5000/group/other_project:latest" - } - ] } ] ``` diff --git a/lib/api/group_container_repositories.rb b/lib/api/group_container_repositories.rb index 97681a7cbe4575145605463b21b0efd94592fc1c..62022368dabbaa7c05dd19a326f9a34848430c77 100644 --- a/lib/api/group_container_repositories.rb +++ b/lib/api/group_container_repositories.rb @@ -24,8 +24,6 @@ class GroupContainerRepositories < ::API::Base end params do use :pagination - optional :tags, type: Boolean, default: false, desc: 'Determines if tags should be included' - optional :tags_count, type: Boolean, default: false, desc: 'Determines if the tags count should be included' end get ':id/registry/repositories' do repositories = ContainerRepositoriesFinder.new( @@ -34,7 +32,7 @@ class GroupContainerRepositories < ::API::Base track_package_event('list_repositories', :container, user: current_user, namespace: user_group) - present paginate(repositories), with: Entities::ContainerRegistry::Repository, tags: params[:tags], tags_count: params[:tags_count] + present paginate(repositories), with: Entities::ContainerRegistry::Repository, tags: false, tags_count: false end end diff --git a/spec/requests/api/group_container_repositories_spec.rb b/spec/requests/api/group_container_repositories_spec.rb index aceea79777386abe667fe31705f1215b7be28016..413c37eaed937e4f1e6d5bdf413454215181d7e0 100644 --- a/spec/requests/api/group_container_repositories_spec.rb +++ b/spec/requests/api/group_container_repositories_spec.rb @@ -37,22 +37,15 @@ let(:url) { "/groups/#{group.id}/registry/repositories" } let(:snowplow_gitlab_standard_context) { { user: api_user, namespace: group } } - subject { get api(url, api_user), params: params } + subject { get api(url, api_user) } it_behaves_like 'rejected container repository access', :guest, :forbidden it_behaves_like 'rejected container repository access', :anonymous, :not_found - it_behaves_like 'handling network errors with the container registry' do - let(:params) { { tags: true } } - end it_behaves_like 'returns repositories for allowed users', :reporter, 'group' do let(:object) { group } end - it_behaves_like 'returns tags for allowed users', :reporter, 'group' do - let(:object) { group } - end - it_behaves_like 'a package tracking event', described_class.name, 'list_repositories' context 'with invalid group id' do