mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 01:20:02 +03:00
return from _get_responses earlier when delete method
This commit is contained in:
parent
e15177383c
commit
5de0ab498c
|
@ -465,6 +465,13 @@ class AutoSchema(ViewInspector):
|
||||||
|
|
||||||
def _get_responses(self, path, method):
|
def _get_responses(self, path, method):
|
||||||
# TODO: Handle multiple codes and pagination classes.
|
# TODO: Handle multiple codes and pagination classes.
|
||||||
|
if method == 'DELETE':
|
||||||
|
return {
|
||||||
|
'204': {
|
||||||
|
'description': ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
item_schema = {}
|
item_schema = {}
|
||||||
serializer = self._get_serializer(path, method)
|
serializer = self._get_serializer(path, method)
|
||||||
|
|
||||||
|
@ -485,13 +492,6 @@ class AutoSchema(ViewInspector):
|
||||||
else:
|
else:
|
||||||
response_schema = item_schema
|
response_schema = item_schema
|
||||||
|
|
||||||
if method == 'DELETE':
|
|
||||||
return {
|
|
||||||
'204': {
|
|
||||||
'description': ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'200': {
|
'200': {
|
||||||
'content': {
|
'content': {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user