Skip to content

Commit

Permalink
Add OpenAPI specifications for createmaintenanceincident
Browse files Browse the repository at this point in the history
Co-authored-by: Eduardo Navarro <enavarro@suse.com>
  • Loading branch information
rubhanazeem and eduardoj committed Nov 30, 2021
1 parent 3d1ce29 commit 7715b66
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
4 changes: 4 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 @@ -17,6 +17,7 @@ tags:
- name: Person
- name: Published Binaries
- name: Requests
- name: Sources
- name: Trigger
- name: Workers

Expand Down Expand Up @@ -169,6 +170,9 @@ paths:
/service:
$ref: 'paths/service.yaml'

/source?cmd=createmaintenanceincident:
$ref: 'paths/source_createmaintenanceincident.yaml'

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type: object
properties:
code:
type: string
xml:
attribute: true
summary:
type: string
xml:
name: status
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
post:
summary: Create maintenance incident projects
description: Create a mainatenance incident project based on attribute search.
security:
- basic_authentication: []
parameters:
- in: query
name: attribute
schema:
type: string
example: OBS:MaintenanceProject
description: attribute used for package search, default is OBS:MaintenanceProject
responses:
'200':
description: ok
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
example:
code: ok
summary: Ok
data:
- MaintenanceProject:1
'400':
description: Bad Request
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/code_and_summary.yaml'
example:
code: incident_has_no_maintenance_project
summary: incident projects shall only create below maintenance projects
'401':
$ref: '../components/responses/unauthorized.yaml'
'403':
description: Forbidden
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/code_and_summary.yaml'
example:
code: modify_project_no_permission
summary: no permission to modify project 'MaintenanceProject'
tags:
- Sources

0 comments on commit 7715b66

Please sign in to comment.