Skip to content

Commit 59dcda9

Browse files
authored
Merge pull request #495 from bbiggerr/202-response
Add 202 response
2 parents a8db4ca + 6caecf7 commit 59dcda9

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

openapi.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ info:
154154
| STATUS | DESCRIPTION |
155155
|---------|-------------|
156156
| 200 OK | The request was successful. |
157+
| 202 Accepted | The request was successful, but processing has not been completed. The response body includes a "warnings" array containing the details of incomplete processes. |
157158
| 204 No Content | The server successfully fulfilled the request and there is no additional content to send. |
158159
| 400 Bad Request | You submitted an invalid request (missing parameters, etc.). |
159160
| 401 Unauthorized | You failed to authenticate for this resource. |
@@ -1916,6 +1917,8 @@ paths:
19161917
application/json:
19171918
schema:
19181919
$ref: '#/components/schemas/Payment'
1920+
'202':
1921+
$ref: '#/components/responses/WarningResponse'
19191922
default:
19201923
$ref: '#/components/responses/ErrorResponse'
19211924
x-code-samples:
@@ -2070,6 +2073,8 @@ paths:
20702073
application/json:
20712074
schema:
20722075
type: object
2076+
'202':
2077+
$ref: '#/components/responses/WarningResponse'
20732078
default:
20742079
$ref: '#/components/responses/ErrorResponse'
20752080
x-code-samples:
@@ -15662,6 +15667,20 @@ components:
1566215667
type: array
1566315668
items:
1566415669
$ref: '#/components/schemas/ErrorObject'
15670+
WarningResponse:
15671+
description: |
15672+
Accepted with warning.
15673+
15674+
A warning object is included with the standard 200 response.
15675+
content:
15676+
application/json:
15677+
schema:
15678+
type: object
15679+
properties:
15680+
warnings:
15681+
type: array
15682+
items:
15683+
$ref: '#/components/schemas/WarningObject'
1566515684
parameters:
1566615685
pageOffset:
1566715686
name: page
@@ -22230,6 +22249,21 @@ components:
2223022249
example:
2223122250
- example tag
2223222251
- another example
22252+
WarningObject:
22253+
type: object
22254+
description: >
22255+
An object for describing a single warning for incomplete processing associated with an accepted request.
22256+
properties:
22257+
title:
22258+
type: string
22259+
description: >
22260+
The general warning message.
22261+
example: Unable to reboot Linode.
22262+
details:
22263+
type: string
22264+
description: >
22265+
Specific information related to the warning.
22266+
example: Linode 123 could not be rebooted.
2223322267
tags:
2223422268
- name: Account
2223522269
description: Use the Account endpoints to manage user settings, billing, and payments. You can also initiate and maintain OAuth client application authentication, enable the Linode Managed service, and create new users on your account.

0 commit comments

Comments
 (0)