Skip to content

Commit

Permalink
Add OpenAPI documentation for request show endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
krauselukas committed Jan 21, 2021
1 parent 0bb8adc commit 12311b1
Show file tree
Hide file tree
Showing 4 changed files with 43 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 @@ -66,6 +66,8 @@ paths:
$ref: 'paths/request.yaml'
/request?view=collection:
$ref: 'paths/request_request_collection.yaml'
/request/{id}:
$ref: 'paths/request_request_id.yaml'

components:
securitySchemes:
Expand Down
8 changes: 8 additions & 0 deletions src/api/public/apidocs-new/components/parameters/request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,11 @@ Ids:
type: string
description: Limit the result to specified request id's. Multiple id's can be provided as a comma separated list.
example: 15,19,23
RequestId:
in: path
name: id
schema:
type: integer
required: true
description: Id of the choosen request.
example: 743
8 changes: 8 additions & 0 deletions src/api/public/apidocs-new/components/responses/request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: |
OK.
XML Schema used for body validation: [request.rng](../schema/request.rng)
content:
application/xml; charset=utf-8:
schema:
$ref: '../schemas/request/request.yaml'
25 changes: 25 additions & 0 deletions src/api/public/apidocs-new/paths/request_request_id.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
get:
summary: Show details about a specified request.
description: Show details about a specified request.
security:
- basic_authentication: []
parameters:
- $ref: '../components/parameters/request.yaml#/RequestId'
- $ref: '../components/parameters/request.yaml#/WithHistory'
- $ref: '../components/parameters/request.yaml#/WithFullHistory'
responses:
'200':
$ref: '../components/responses/request.yaml'
'401':
$ref: '../components/responses/unauthorized.yaml'
'404':
description: Not Found
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
example:
code: not_found
summary: Couldn't find request with id '5'
tags:
- Request

0 comments on commit 12311b1

Please sign in to comment.