Skip to content

Commit

Permalink
Merge pull request #14213 from saraycp/staging_backlog_endpoint
Browse files Browse the repository at this point in the history
Document staging backlog endpoint with OpenAPI
  • Loading branch information
saraycp committed Apr 25, 2023
2 parents a0fd68f + 06f8563 commit 4c5b101
Show file tree
Hide file tree
Showing 3 changed files with 80 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 @@ -388,6 +388,8 @@ paths:
$ref: 'paths/source_project_name_package_name_binary_filename_attribute.yaml'

# Staging Workflow
/staging/{project_name}/backlog:
$ref: 'paths/staging_project_name_backlog.yaml'
/staging/{staging_workflow_project}/workflow:
$ref: 'paths/staging_staging_workflow_project_workflow.yaml'

Expand Down
44 changes: 44 additions & 0 deletions src/api/public/apidocs-new/components/schemas/staging/backlog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
type: object
properties:
request:
type: array
items:
type: object
properties:
id:
type: integer
example: 42
xml:
attribute: true
creator:
type: string
example: foo-user
xml:
attribute: true
type:
type: string
example: submit
xml:
attribute: true
state:
type: string
example: review
xml:
attribute: true
package:
type: string
example: 'hello_world'
xml:
attribute: true
superseded_by:
type: integer
example: 43
xml:
attribute: true
updated:
type: string
example: '2023-04-24T08:34:39Z'
xml:
attribute: true
xml:
name: backlog
34 changes: 34 additions & 0 deletions src/api/public/apidocs-new/paths/staging_project_name_backlog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
get:
summary: List the requests in the staging backlog.
description: |
List the requests that can be assigned to the staging project (backlog).
security:
- basic_authentication: []
parameters:
- $ref: '../components/parameters/project_name.yaml'
responses:
'200':
description: List of request in the staging backlog.
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/staging/backlog.yaml'
'401':
$ref: '../components/responses/unauthorized.yaml'
'404':
description: Not Found
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
examples:
project_without_staging_workflow:
value:
code: not_found
sumary: "Project project_name doesn't have an associated Staging Workflow"
Unknown Project:
value:
code: unknown_project
summary: "Project not found: <some project>."
tags:
- Staging Workflow

0 comments on commit 4c5b101

Please sign in to comment.