mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-03 20:10:10 +03:00
Adding DELETE to accept body on AutoSchema
According to [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.5), even tough some implementations rejects the payload body, it's not forbidden or discouraged, so in my opinion should be allowed.
This commit is contained in:
parent
9f66e8badd
commit
659b113b84
|
@ -293,7 +293,7 @@ class AutoSchema(ViewInspector):
|
|||
"""
|
||||
view = self.view
|
||||
|
||||
if method not in ('PUT', 'PATCH', 'POST'):
|
||||
if method not in ('PUT', 'PATCH', 'POST', 'DELETE'):
|
||||
return []
|
||||
|
||||
if not hasattr(view, 'get_serializer'):
|
||||
|
|
Loading…
Reference in New Issue
Block a user