Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add HTTP 429 Too Many Requests as a possible generic error response#1226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Note that in line with [Django REST framework policy](https://www.django-rest-framework.org/topics/release-notes/),
any parts of the framework not mentioned in the documentation should generally be considered private API, and may be subject to change.

## [Unreleased]

### Added

* Added `429 Too Many Requests` as a possible error response in the OpenAPI schema.

## [7.0.0] - 2024-05-02

### Added
Expand Down
60 changes: 60 additions & 0 deletionsexample/tests/__snapshots__/test_openapi.ambr
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,6 +68,16 @@
}
},
"description": "[Resource does not exist](https://jsonapi.org/format/#crud-deleting-responses-404)"
},
"429": {
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/failure"
}
}
},
"description": "too many requests"
}
},
"tags": [
Expand DownExpand Up@@ -264,6 +274,16 @@
}
},
"description": "[Conflict]([Conflict](https://jsonapi.org/format/#crud-updating-responses-409)"
},
"429": {
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/failure"
}
}
},
"description": "too many requests"
}
},
"tags": [
Expand DownExpand Up@@ -399,6 +419,16 @@
}
},
"description": "not found"
},
"429": {
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/failure"
}
}
},
"description": "too many requests"
}
},
"tags": [
Expand DownExpand Up@@ -546,6 +576,16 @@
}
},
"description": "not found"
},
"429": {
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/failure"
}
}
},
"description": "too many requests"
}
},
"tags": [
Expand DownExpand Up@@ -754,6 +794,16 @@
}
},
"description": "[Conflict](https://jsonapi.org/format/#crud-creating-responses-409)"
},
"429": {
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/failure"
}
}
},
"description": "too many requests"
}
},
"tags": [
Expand DownExpand Up@@ -1341,6 +1391,16 @@
}
},
"description": "not found"
},
"429": {
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/failure"
}
}
},
"description": "too many requests"
}
},
"tags": [
Expand Down
1 change: 1 addition & 0 deletionsrest_framework_json_api/schemas/openapi.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -807,6 +807,7 @@ def _add_generic_failure_responses(self, operation):
for code, reason in [
("400", "bad request"),
("401", "not authorized"),
("429", "too many requests"),
]:
operation["responses"][code] = self._failure_response(reason)

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp