Skip to content

Commit d70ac08

Browse files
jenkins-botGerrit Code Review
authored andcommitted
Merge "REST: Add 429 response to OAS for edit routes"
2 parents d14cce8 + 31e243c commit d70ac08

24 files changed

+186
-0
lines changed

repo/rest-api/specs/global/responses.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,31 @@
113113
}
114114
}
115115
},
116+
"RequestLimitReached": {
117+
"description": "Too many requests",
118+
"content": {
119+
"application/json": {
120+
"schema": { "$ref": "./response-parts.json#/Error" },
121+
"examples": {
122+
"request-limit-reached": {
123+
"value": {
124+
"code": "request-limit-reached",
125+
"message": "Exceeded the limit of actions that can be performed in a given span of time",
126+
"context": { "reason": "{reason_code}" }
127+
}
128+
}
129+
}
130+
}
131+
},
132+
"headers": {
133+
"Content-Language": {
134+
"schema": {
135+
"type": "string"
136+
},
137+
"description": "Language code of the language in which error message is provided"
138+
}
139+
}
140+
},
116141
"ResourceNotFound": {
117142
"description": "The specified resource was not found",
118143
"content": {

repo/rest-api/specs/resources/aliases/aliases-in-language-for-item.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
5252
"409": { "$ref": "../../global/responses.json#/ItemRedirected" },
5353
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
54+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
5455
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
5556
}
5657
}

repo/rest-api/specs/resources/aliases/aliases-in-language-for-property.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"403": { "$ref": "../../global/responses.json#/PermissionDenied" },
5050
"404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
5151
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
52+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
5253
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
5354
}
5455
}

repo/rest-api/specs/resources/aliases/list-for-item.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"409": { "$ref": "../../global/responses.json#/CannotApplyItemPatch" },
4141
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
4242
"422": { "$ref": "../../global/responses.json#/InvalidPatchedAliases" },
43+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
4344
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
4445
}
4546
}

repo/rest-api/specs/resources/aliases/list-for-property.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"409": { "$ref": "../../global/responses.json#/CannotApplyPropertyPatch" },
4040
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
4141
"422": { "$ref": "../../global/responses.json#/InvalidPatchedAliases" },
42+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
4243
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
4344
}
4445
}

repo/rest-api/specs/resources/descriptions/description-in-language-for-item.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"409": { "$ref": "../../global/responses.json#/ItemRedirected" },
5353
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
5454
"422": { "$ref": "../../global/responses.json#/DataPolicyViolation" },
55+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
5556
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
5657
}
5758
},
@@ -76,6 +77,7 @@
7677
"404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
7778
"409": { "$ref": "../../global/responses.json#/ItemRedirected" },
7879
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
80+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
7981
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
8082
}
8183
}

repo/rest-api/specs/resources/descriptions/description-in-language-for-property.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
5151
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
5252
"422": { "$ref": "../../global/responses.json#/DataPolicyViolation" },
53+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
5354
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
5455
}
5556
},
@@ -73,6 +74,7 @@
7374
"403": { "$ref": "../../global/responses.json#/PermissionDenied" },
7475
"404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
7576
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
77+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
7678
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
7779
}
7880
}

repo/rest-api/specs/resources/descriptions/list-for-item.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"409": { "$ref": "../../global/responses.json#/CannotApplyItemPatch" },
4444
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
4545
"422": { "$ref": "../../global/responses.json#/InvalidPatchedDescriptions" },
46+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
4647
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
4748
}
4849
}

repo/rest-api/specs/resources/descriptions/list-for-property.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"409": { "$ref": "../../global/responses.json#/CannotApplyPropertyPatch" },
4343
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
4444
"422": { "$ref": "../../global/responses.json#/InvalidPatchedDescriptions" },
45+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
4546
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
4647
}
4748
}

repo/rest-api/specs/resources/items/list.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"400": { "$ref": "./responses.json#/InvalidNewItemInput" },
1313
"403": { "$ref": "../../global/responses.json#/PermissionDenied" },
1414
"422": { "$ref": "../../global/responses.json#/DataPolicyViolation" },
15+
"429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
1516
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
1617
}
1718
}

0 commit comments

Comments
 (0)