Skip to content

Commit

Permalink
Document package deleteuploadrev command with OpenAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwiedemann committed Mar 16, 2023
1 parent 021a72c commit 5d0a229
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def self.possibly_nobody
current || nobody
end

# Currently logged in user. Will thrown an exception if no user is logged in.
# Currently logged in user. Will throw an exception if no user is logged in.
# So the controller needs to require login if using this (or models using it)
def self.session!
raise ArgumentError, 'Requiring user, but found nobody' unless session
Expand Down
2 changes: 2 additions & 0 deletions src/api/public/apidocs-new/OBS-v2.10.50.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ paths:
$ref: 'paths/source_project_name_package_name_cmd_copy.yaml'
/source/{project_name}/{package_name}?cmd=createSpecFileTemplate:
$ref: 'paths/source_project_name_package_name_cmd_createSpecFileTemplate.yaml'
/source/{project_name}/{package_name}?cmd=deleteuploadrev:
$ref: 'paths/source_project_name_package_name_cmd_deleteuploadrev.yaml'
/source/{project_name}/{package_name}?cmd=diff:
$ref: 'paths/source_project_name_package_name_cmd_diff.yaml'
/source/{project_name}/{package_name}?cmd=linkdiff:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
post:
summary: Delete all uploaded sources which are not committed yet.
description: |
Removes all changes made to the upload revision and reverts to last committed revision
security:
- basic_authentication: []
parameters:
- $ref: '../components/parameters/project_name.yaml'
- $ref: '../components/parameters/package_name.yaml'
responses:
'200':
$ref: '../components/responses/succeeded.yaml'
'401':
$ref: '../components/responses/unauthorized.yaml'
'403':
description: Forbidden.
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
example:
code: cmd_execution_no_permission
summary: no permission to modify package ctris in project home:Admin
'404':
$ref: '../components/responses/unknown_project_or_package.yaml'
tags:
- Sources - Packages

0 comments on commit 5d0a229

Please sign in to comment.