mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 17:09:59 +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):
|
||||
# TODO: Handle multiple codes and pagination classes.
|
||||
if method == 'DELETE':
|
||||
return {
|
||||
'204': {
|
||||
'description': ''
|
||||
}
|
||||
}
|
||||
|
||||
item_schema = {}
|
||||
serializer = self._get_serializer(path, method)
|
||||
|
||||
|
@ -485,13 +492,6 @@ class AutoSchema(ViewInspector):
|
|||
else:
|
||||
response_schema = item_schema
|
||||
|
||||
if method == 'DELETE':
|
||||
return {
|
||||
'204': {
|
||||
'description': ''
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
'200': {
|
||||
'content': {
|
||||
|
|
Loading…
Reference in New Issue
Block a user