Skip to content

Commit

Permalink
Fixes encode#6875 - OpenAPI Schema inconsistent operationId casing
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfarrell committed Aug 19, 2019
1 parent 5ce5482 commit 8441c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework/schemas/openapi.py
Expand Up @@ -135,7 +135,7 @@ def _get_operation_id(self, path, method):
name = name[:-7]
elif name.endswith('View'):
name = name[:-4]
if name.endswith(action): # ListView, UpdateAPIView, ThingDelete ...
if action != 'list' and name.endswith(action): # ListView, UpdateAPIView, ThingDelete ...
name = name[:-len(action)]

if action == 'list' and not name.endswith('s'): # listThings instead of listThing
Expand Down

0 comments on commit 8441c5e

Please sign in to comment.