From 659b113b840c6731a22bd95a40744708e050e0de Mon Sep 17 00:00:00 2001 From: Gabriel-Arimatea Date: Fri, 17 Nov 2017 10:01:15 -0300 Subject: [PATCH] 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. --- rest_framework/schemas/inspectors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/schemas/inspectors.py b/rest_framework/schemas/inspectors.py index bae4d38ed..826527914 100644 --- a/rest_framework/schemas/inspectors.py +++ b/rest_framework/schemas/inspectors.py @@ -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'):