Skip to content

Commit

Permalink
Document the GET /staging/{staging_workflow_project}/staging_projects…
Browse files Browse the repository at this point in the history
…/{staging_project_name}
  • Loading branch information
danidoni committed Apr 27, 2023
1 parent fb780ab commit ce4583f
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
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 @@ -400,6 +400,8 @@ paths:
$ref: 'paths/staging_project_name_staging_projects.yaml'
/staging/{project_name}/workflow:
$ref: 'paths/staging_project_name_workflow.yaml'
/staging/{project_name}/staging_projects/{staging_project_name}:
$ref: 'paths/staging_project_name_staging_projects_staging_project_name.yaml'

# Status messages
/status/messages:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
in: path
name: staging_project_name
schema:
type: string
required: true
description: Staging Project Name
example: "openSUSE:Factory:Staging:A"
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
get:
summary: Gets the overall state of a staging project.
description: |
Extra information can be requested by adding any combination of these parameters in the URL: requests, status and history.
- If requests is present, the output includes the staged, untracked and obsolete requests as well as missing reviews.
- If status is present, the output includes the overall state and the status xml (broken packages, missing reviews, checks, etc.)
- If history is present, the output includes the history of the staging project.
security:
- basic_authentication: []
parameters:
- $ref: '../components/parameters/project_name.yaml'
- $ref: '../components/parameters/staging_project_name.yaml'
- name: requests
in: query
schema:
type: string
enum:
- 1
description: |
Set to `1` if you want to include the staged, untracked and obsolete requests as well as missing reviews, otherwise don't pass this query parameter.
- name: status
in: query
schema:
type: string
enum:
- 1
description: |
Set to `1` if you want to include the overall state and the status xml (broken packages, missing reviews, checks, etc.), otherwise don't pass this query parameter.
- name: history
in: query
schema:
type: string
enum:
- 1
description: |
Set to `1` if you want to include the history of the staging project, otherwise don't pass this query parameter.
responses:
'200':
description: Get the state of a staging project.
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/staging/staging_project.yaml'
example:
name: 'home:Iggy:Staging:A'
state: 'empty'
staged_requests:
count: 0
untracked_requests:
count: 0
obsolete_requests:
count: 0
missing_reviews:
count: 0
building_repositories:
count: 0
broken_packages:
count: 0
checks:
count: 0
missing_checks:
count: 0
history:
count: 0
'404':
description: Not Found.
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
examples:
not_found:
summary: Staging Workflow Project Not Found
value:
code: not_found
summary: 'Project home:Adminn not found.'
staging_project_not_found:
summary: Staging Project Name Not Found
value:
code: staging_project_not_found
details: 'Staging Project "home:Admin:Staging:AA" does not exist.'
tags:
- Staging Workflow

0 comments on commit ce4583f

Please sign in to comment.