Skip to content

Commit

Permalink
Add OpenAPI documentation for request update endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
krauselukas committed Jan 21, 2021
1 parent 76587ae commit 00ffb24
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/api/public/apidocs-new/paths/request_request_id.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,51 @@ post:
summary: Couldn't find request with id '120'
tags:
- Request

put:
summary: Modify a given request.
description: |
Modify a given request.
**NOTE:** Certain parts of a request can only be changed by admins.
security:
- basic_authentication: []
parameters:
- $ref: '../components/parameters/request.yaml#/RequestId'
requestBody:
description: |
Request XML
**NOTE:** You cannot pass the request id in the xml. You can pass the history in the xml, but it will be simply ignored.
XML Schema used for body validation: [request.rng](../schema/request.rng)
required: true
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/request/request.yaml'
responses:
'200':
$ref: '../components/responses/request.yaml'
'400':
description: Bad Request
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
example:
code: request_save_error
summary: Auto accept time is in the past
'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 '10'
tags:
- Request

0 comments on commit 00ffb24

Please sign in to comment.