Skip to content

Commit

Permalink
Document /issue_trackers/<name>/issues/<issue_name>
Browse files Browse the repository at this point in the history
... routes with OpenAPI.
  • Loading branch information
eduardoj committed Jan 20, 2021
1 parent 1180166 commit 7746b57
Show file tree
Hide file tree
Showing 4 changed files with 65 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 @@ -38,6 +38,8 @@ paths:
$ref: 'paths/issue_trackers.yaml'
/issue_trackers/{issue_tracker_name}:
$ref: 'paths/issue_trackers_issue_tracker_name.yaml'
/issue_trackers/{issue_tracker_name}/issues/{issue_name}:
$ref: 'paths/issue_trackers_issue_tracker_name_issues_issue_name.yaml'

/person:
$ref: 'paths/person.yaml'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
in: path
name: issue_name
schema:
type: string
required: true
description: Issue name.
example: 12345
22 changes: 22 additions & 0 deletions src/api/public/apidocs-new/components/schemas/issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
type: object
properties:
created_at:
type: string
example: '2021-01-18 19:17:51 UTC'
updated_at:
type: string
example: '2021-01-18 19:17:51 UTC'
name:
type: string
example: 12345
tracker:
type: string
example: fate
label:
type: string
example: 'fate#12345'
url:
type: string
example: 'https://features.opensuse.org/12345'
xml:
name: issue
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
get:
summary: Show an issue of an issue tracker.
description: Show an issue of an issue tracker.
security:
- basic_authentication: []
parameters:
- $ref: '../components/parameters/issue_name.yaml'
responses:
'200':
description: |
Issue definition.
XML Schema used for body validation: [issue.rng](../schema/issue.rng)
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/issue.yaml'
'401':
$ref: '../components/responses/unauthorized.yaml'
'404':
description: |
Not Found.
XML Schema used for body validation: [status.xsd](../schema/status.xsd)
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
example:
code: issue_tracker_not_found
summary: Error: Issue Tracker 'foo' not found.
tags:
- Issue Trackers

0 comments on commit 7746b57

Please sign in to comment.