diff --git a/rest_framework/schemas/generators.py b/rest_framework/schemas/generators.py index 77e92eeb8..e1f33780b 100644 --- a/rest_framework/schemas/generators.py +++ b/rest_framework/schemas/generators.py @@ -138,7 +138,7 @@ class EndpointEnumerator: http_method_names = set(callback.cls.http_method_names) methods = [method.upper() for method in actions & http_method_names] else: - methods = callback.cls().allowed_methods + methods = [method.upper() for method in callback.cls().allowed_methods & http_method_names] return [method for method in methods if method not in ('OPTIONS', 'HEAD')]