File tree Expand file tree Collapse file tree 2 files changed +67
-6
lines changed
example/tests/__snapshots__
rest_framework_json_api/schemas Expand file tree Collapse file tree 2 files changed +67
-6
lines changed 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- }
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"
81+ },
7282 },
7383 "tags": [
7484 "authors"
264274 }
265275 },
266276 "description": "[Conflict]([Conflict](https://jsonapi.org/format/#crud-updating-responses-409)"
267- }
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"
287+ },
268288 },
269289 "tags": [
270290 "authors"
399419 }
400420 },
401421 "description": "not found"
402- }
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"
432+ },
403433 },
404434 "tags": [
405435 "authors"
546576 }
547577 },
548578 "description": "not found"
549- }
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"
589+ },
550590 },
551591 "tags": [
552592 "authors"
754794 }
755795 },
756796 "description": "[Conflict](https://jsonapi.org/format/#crud-creating-responses-409)"
757- }
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"
807+ },
758808 },
759809 "tags": [
760810 "authors"
13411391 }
13421392 },
13431393 "description": "not found"
1344- }
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"
1404+ },
13451405 },
13461406 "tags": [
13471407 "authors"
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