File tree Expand file tree Collapse file tree 3 files changed +67
-0
lines changed
example/tests/__snapshots__
rest_framework_json_api/schemas Expand file tree Collapse file tree 3 files changed +67
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88Note that in line with [ Django REST framework policy] ( https://www.django-rest-framework.org/topics/release-notes/ ) ,
99any parts of the framework not mentioned in the documentation should generally be considered private API, and may be subject to change.
1010
11+ ## [ Unreleased]
12+
13+ ### Added
14+
15+ * Added ` 429 Too Many Requests ` as a possible error response in the OpenAPI schema.
16+
1117## [ 7.0.0] - 2024-05-02
1218
1319### Added
Original file line number Diff line number Diff line change 6868 }
6969 },
7070 "description": "[Resource does not exist](https://jsonapi.org/format/#crud-deleting-responses-404)"
71+ },
72+ "429": {
73+ "content": {
74+ "application/vnd.api+json": {
75+ "schema": {
76+ "$ref": "#/components/schemas/failure"
77+ }
78+ }
79+ },
80+ "description": "too many requests"
7181 }
7282 },
7383 "tags": [
264274 }
265275 },
266276 "description": "[Conflict]([Conflict](https://jsonapi.org/format/#crud-updating-responses-409)"
277+ },
278+ "429": {
279+ "content": {
280+ "application/vnd.api+json": {
281+ "schema": {
282+ "$ref": "#/components/schemas/failure"
283+ }
284+ }
285+ },
286+ "description": "too many requests"
267287 }
268288 },
269289 "tags": [
399419 }
400420 },
401421 "description": "not found"
422+ },
423+ "429": {
424+ "content": {
425+ "application/vnd.api+json": {
426+ "schema": {
427+ "$ref": "#/components/schemas/failure"
428+ }
429+ }
430+ },
431+ "description": "too many requests"
402432 }
403433 },
404434 "tags": [
546576 }
547577 },
548578 "description": "not found"
579+ },
580+ "429": {
581+ "content": {
582+ "application/vnd.api+json": {
583+ "schema": {
584+ "$ref": "#/components/schemas/failure"
585+ }
586+ }
587+ },
588+ "description": "too many requests"
549589 }
550590 },
551591 "tags": [
754794 }
755795 },
756796 "description": "[Conflict](https://jsonapi.org/format/#crud-creating-responses-409)"
797+ },
798+ "429": {
799+ "content": {
800+ "application/vnd.api+json": {
801+ "schema": {
802+ "$ref": "#/components/schemas/failure"
803+ }
804+ }
805+ },
806+ "description": "too many requests"
757807 }
758808 },
759809 "tags": [
13411391 }
13421392 },
13431393 "description": "not found"
1394+ },
1395+ "429": {
1396+ "content": {
1397+ "application/vnd.api+json": {
1398+ "schema": {
1399+ "$ref": "#/components/schemas/failure"
1400+ }
1401+ }
1402+ },
1403+ "description": "too many requests"
13441404 }
13451405 },
13461406 "tags": [
Original file line number Diff line number Diff line change @@ -807,6 +807,7 @@ def _add_generic_failure_responses(self, operation):
807807 for code , reason in [
808808 ("400" , "bad request" ),
809809 ("401" , "not authorized" ),
810+ ("429" , "too many requests" ),
810811 ]:
811812 operation ["responses" ][code ] = self ._failure_response (reason )
812813
You can’t perform that action at this time.
0 commit comments