diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /lib/api/debian_project_packages.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'lib/api/debian_project_packages.rb')
-rw-r--r-- | lib/api/debian_project_packages.rb | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/lib/api/debian_project_packages.rb b/lib/api/debian_project_packages.rb index df3b6e774ae..23a542e4183 100644 --- a/lib/api/debian_project_packages.rb +++ b/lib/api/debian_project_packages.rb @@ -45,8 +45,15 @@ module API use :shared_package_file_params end - desc 'The package' do + desc 'Download Debian package' do detail 'This feature was introduced in GitLab 14.2' + success code: 200 + failure [ + { code: 401, message: 'Unauthorized' }, + { code: 403, message: 'Forbidden' }, + { code: 404, message: 'Not Found' } + ] + tags %w[debian_packages] end route_setting :authentication, authenticate_non_public: true @@ -55,13 +62,25 @@ module API end params do - requires :file_name, type: String, desc: 'The file name' + requires :file_name, type: String, desc: 'The file name', documentation: { example: 'example_1.0.0~alpha2_amd64.deb' } end namespace ':file_name', requirements: FILE_NAME_REQUIREMENTS do format :txt content_type :json, Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE + desc 'Upload Debian package' do + detail 'This feature was introduced in GitLab 14.0' + success code: 201 + failure [ + { code: 400, message: 'Bad Request' }, + { code: 401, message: 'Unauthorized' }, + { code: 403, message: 'Forbidden' }, + { code: 404, message: 'Not Found' } + ] + tags %w[debian_packages] + end + # PUT {projects|groups}/:id/packages/debian/:file_name params do requires :file, type: ::API::Validations::Types::WorkhorseFile, desc: 'The package file to be published (generated by Multipart middleware)', documentation: { type: 'file' } @@ -91,6 +110,16 @@ module API end # PUT {projects|groups}/:id/packages/debian/:file_name/authorize + desc 'Authorize Debian package upload' do + detail 'This feature was introduced in GitLab 13.5' + success code: 200 + failure [ + { code: 401, message: 'Unauthorized' }, + { code: 403, message: 'Forbidden' }, + { code: 404, message: 'Not Found' } + ] + tags %w[debian_packages] + end route_setting :authentication, deploy_token_allowed: true, basic_auth_personal_access_token: true, job_token_allowed: :basic_auth, authenticate_non_public: true put 'authorize' do authorize_workhorse!( |