-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OpenAPI specifications for source cmd orderkiwirepos
- Loading branch information
1 parent
a6556eb
commit 4889dae
Showing
3 changed files
with
82 additions
and
1 deletion.
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
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,26 @@ | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
xml: | ||
attribute: true | ||
schemaversion: | ||
type: string | ||
xml: | ||
attribute: true | ||
repository: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
source: | ||
type: object | ||
properties: | ||
path: | ||
type: string | ||
xml: | ||
attribute: true | ||
xml: | ||
name: repository | ||
xml: | ||
name: image |
54 changes: 54 additions & 0 deletions
54
src/api/public/apidocs-new/paths/source_orderkiwirepos.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,54 @@ | ||
post: | ||
summary: Sort the repositories inside of a kiwi file according to path relationships. | ||
description: This API takes kiwi XML file in the request body and sort the repositories based on priority. | ||
requestBody: | ||
required: true | ||
content: | ||
application/xml; charset=utf-8: | ||
schema: | ||
$ref: '../components/schemas/kiwi.yaml' | ||
example: | | ||
<image name="{exc_image_base_name}" schemaversion="7.4"> | ||
<repository type="rpm-md" priority="99" alias="kiwi"> | ||
<source path="obs://Virtualization:Appliances:Builder/openSUSE_Leap_15.3"/> | ||
</repository> | ||
<repository type="rpm-md" priority="1" alias="OS" imageinclude="true"> | ||
<source path="{exc_repo}"/> | ||
</repository> | ||
</image> | ||
responses: | ||
'200': | ||
description: Sorted list of repositories | ||
content: | ||
text/xml: | ||
schema: | ||
$ref: '../components/schemas/kiwi.yaml' | ||
example: | | ||
<image name="{exc_image_base_name}" schemaversion="7.4"> | ||
<repository type="rpm-md" priority="1" alias="OS" imageinclude="true"> | ||
<source path="{exc_repo}"/> | ||
</repository> | ||
<repository type="rpm-md" priority="99" alias="kiwi"> | ||
<source path="obs://Virtualization:Appliances:Builder/openSUSE_Leap_15.3"/> | ||
</repository> | ||
</image> | ||
'400': | ||
description: Bad Request | ||
content: | ||
application/xml; charset=utf-8: | ||
schema: | ||
type: object | ||
properties: | ||
code: | ||
type: string | ||
xml: | ||
attribute: true | ||
summary: | ||
type: string | ||
xml: | ||
name: status | ||
example: | ||
code: 400 | ||
summary: '/srv/obs/sources/:upload/1344: not xml' | ||
tags: | ||
- Sources |