File tree 3 files changed +67
-0
lines changed
example/tests/__snapshots__
rest_framework_json_api/schemas
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
8
8
Note that in line with [ Django REST framework policy] ( https://www.django-rest-framework.org/topics/release-notes/ ) ,
9
9
any parts of the framework not mentioned in the documentation should generally be considered private API, and may be subject to change.
10
10
11
+ ## [ Unreleased]
12
+
13
+ ### Added
14
+
15
+ * Added ` 429 Too Many Requests ` as a possible error response in the OpenAPI schema.
16
+
11
17
## [ 7.0.0] - 2024-05-02
12
18
13
19
### Added
Original file line number Diff line number Diff line change 68
68
}
69
69
},
70
70
"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"
71
81
}
72
82
},
73
83
"tags": [
264
274
}
265
275
},
266
276
"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"
267
287
}
268
288
},
269
289
"tags": [
399
419
}
400
420
},
401
421
"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"
402
432
}
403
433
},
404
434
"tags": [
546
576
}
547
577
},
548
578
"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"
549
589
}
550
590
},
551
591
"tags": [
754
794
}
755
795
},
756
796
"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"
757
807
}
758
808
},
759
809
"tags": [
1341
1391
}
1342
1392
},
1343
1393
"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"
1344
1404
}
1345
1405
},
1346
1406
"tags": [
Original file line number Diff line number Diff line change @@ -807,6 +807,7 @@ def _add_generic_failure_responses(self, operation):
807
807
for code , reason in [
808
808
("400" , "bad request" ),
809
809
("401" , "not authorized" ),
810
+ ("429" , "too many requests" ),
810
811
]:
811
812
operation ["responses" ][code ] = self ._failure_response (reason )
812
813
You can’t perform that action at this time.
0 commit comments