diff --git a/rest_framework/schemas/openapi.py b/rest_framework/schemas/openapi.py index 8c6a7a46e1..a94b3a81ac 100644 --- a/rest_framework/schemas/openapi.py +++ b/rest_framework/schemas/openapi.py @@ -135,7 +135,10 @@ def _get_operation_id(self, path, method): name = name[:-7] elif name.endswith('View'): name = name[:-4] - if action != 'list' and name.endswith(action): # ListView, UpdateAPIView, ThingDelete ... + + # Due to camel-casing of classes and `action` being lowercase, apply title in order to find if action truly + # comes at the end of the name + if name.endswith(action.title()): # ListView, UpdateAPIView, ThingDelete ... name = name[:-len(action)] if action == 'list' and not name.endswith('s'): # listThings instead of listThing