Skip to content

Commit

Permalink
Add OpenAPI specifications for source cmd branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rubhanazeem committed Nov 30, 2021
1 parent 7715b66 commit a6556eb
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 0 deletions.
3 changes: 3 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 @@ -173,6 +173,9 @@ paths:
/source?cmd=createmaintenanceincident:
$ref: 'paths/source_createmaintenanceincident.yaml'

/source?cmd=branch:
$ref: 'paths/source_branch.yaml'

/trigger/{operation}:
$ref: 'paths/trigger_operation.yaml'

Expand Down
110 changes: 110 additions & 0 deletions src/api/public/apidocs-new/paths/source_branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
post:
summary: Branch a set of packages based on attributes
description: |
Create a source link from a package of an existing project to a
new subproject of the requesters home project.
security:
- basic_authentication: []
parameters:
- name: project
description: The project that you want to branch
in: query
schema:
type: string
- name: package
description: The package that you want to branch
in: query
schema:
type: string
- name: target_project
description: Project which will be used or created
in: query
schema:
type: string
- name: target_package
description: Package name which will be used
in: query
schema:
type: string
- name: attribute
description: Attribute used for package search, default is OBS:MaintenanceProject
in: query
schema:
type: string
- name: add_repositories
description: Copy the repositories from branched project
in: query
schema:
type: boolean
- name: update_path_elements
description: Check if repository path elements do use each other and adapt our own path elements
in: query
schema:
type: boolean
- name: noaccess
description: Create hidden project. The new created project will be read protected
in: query
schema:
type: boolean
- name: extend_package_names
description: Extend repo and package names
in: query
schema:
type: boolean
- name: add_repositories_rebuild
description: Use defined rebuild policy for new repos or copy it from the source project
in: query
schema:
type: string
enum: [transitive direct local copy]
- name: add_repositories_block
description: Use defined block policy for new repos
in: query
schema:
type: string
enum: [all local never]
- name: newinstance
description: The target package exists only via project links, but the link should point to given project
in: query
schema:
type: boolean
- name: maintenance
describe: Explicitly asked for maintenance branch
in: query
schema:
type: boolean
responses:
'200':
description: ok
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
example:
code: ok
summary: Ok
data:
- home:Admin
- hello_world
'401':
$ref: '../components/responses/unauthorized.yaml'
'404':
description: Not Found
content:
application/xml; charset=utf-8:
schema:
type: object
properties:
code:
type: string
xml:
attribute: true
summary:
type: string
xml:
name: status
example:
code: not_found
summary: no packages found by search criteria
tags:
- Sources

0 comments on commit a6556eb

Please sign in to comment.