-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document package commitfilelist command with OpenAPI
example usage is in https://github.com/openSUSE/osc/blob/4f9fb9f/osc/core.py#L1566
- Loading branch information
1 parent
4d381b5
commit 4bbd2a6
Showing
2 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
src/api/public/apidocs-new/paths/source_project_name_package_name_cmd_commitfilelist.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
post: | ||
summary: Commit package changes from a filelist. | ||
description: | | ||
Create a new commit using defined files already uploaded to the repository. | ||
This requires a directory xml providing file name and md5 as body. | ||
It is recommended to use the `withvalidate` parameter and add the | ||
sha256 sum including "sha256:" prefix in "hash" attribute for security reasons. | ||
security: | ||
- basic_authentication: [] | ||
parameters: | ||
- $ref: '../components/parameters/project_name.yaml' | ||
- $ref: '../components/parameters/package_name.yaml' | ||
- in: query | ||
name: comment | ||
schema: | ||
type: string | ||
description: Provide a comment to the revision | ||
example: This was changed to improve foobar. | ||
- in: query | ||
name: linkrev | ||
schema: | ||
type: string | ||
description: | | ||
Link revision in base package. Set to `base` to use the commit revision. | ||
Used together with the `keeplink` parameter. | ||
example: base | ||
- in: query | ||
name: rev | ||
schema: | ||
type: string | ||
description: Revision of the package. | ||
- in: query | ||
name: keeplink | ||
schema: | ||
type: string | ||
enum: | ||
- 1 | ||
- 0 | ||
default: 0 | ||
description: Set to `1` to preserve the link (`_link` file) on the source. | ||
example: 1 | ||
- in: query | ||
name: repairlink | ||
schema: | ||
type: string | ||
enum: | ||
- 1 | ||
- 0 | ||
default: 0 | ||
description: | | ||
Set to `1` to solve conflicts. | ||
Used together with `keeplink` parameter. | ||
example: 1 | ||
- in: query | ||
name: withvalidate | ||
schema: | ||
type: string | ||
enum: | ||
- 1 | ||
- 0 | ||
default: 0 | ||
description: Set to `1` to activate sha validation code (optional, but recommended) | ||
example: 1 | ||
responses: | ||
'200': | ||
description: OK. Revision created with this commit. | ||
content: | ||
text/xml: | ||
schema: | ||
$ref: '../components/schemas/revision.yaml' | ||
example: | ||
rev: 86 | ||
vrev: 86 | ||
srcmd5: 55452f7326fe90cb67ca96bf9e9ffabc | ||
version: 2.10~pre | ||
time: 1665060711 | ||
user: Admin | ||
comment: | ||
requestid: | ||
'400': | ||
description: Bad Request. | ||
content: | ||
# The response is not "application/xml; charset=utf-8" | ||
text/plain; charset=utf-8: | ||
schema: | ||
$ref: '../components/schemas/api_response.yaml' | ||
examples: | ||
Not Boolean: | ||
description: Passing a value different than `0` or `1` to `keeplink`, for example. | ||
value: | | ||
<xml version="1.0" encoding="UTF-8"?> | ||
<status code="400" origin="backend"> | ||
<summary>not boolean</summary> | ||
</status> | ||
'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 test in project home:Admin | ||
'404': | ||
$ref: '../components/responses/unknown_project_or_package.yaml' | ||
tags: | ||
- Sources - Packages |