rebased on master

This commit is contained in:
Martin Desrumaux 2020-02-20 16:20:14 +01:00
parent 6e072dbb45
commit 03d3406734
3 changed files with 4 additions and 4 deletions

View File

@ -310,7 +310,7 @@ If you need more configuration over the `operationId` field, you can override th
```python
class CustomSchema(AutoSchema):
def get_operation_id_base(self, action):
def get_operation_id_base(self, path, method, action):
pass
def get_operation_id(self, path, method):

View File

@ -115,7 +115,7 @@ class AutoSchema(ViewInspector):
return operation
def get_operation_id_base(self, action):
def get_operation_id_base(self, path, method, action):
"""
Compute the base part for operation ID from the model, serializer or view name.
"""
@ -164,7 +164,7 @@ class AutoSchema(ViewInspector):
else:
action = self.method_mapping[method.lower()]
name = self.get_operation_id_base(action)
name = self.get_operation_id_base(path, method, action)
return action + name

View File

@ -627,7 +627,7 @@ class TestOperationIntrospection(TestCase):
def test_operation_id_override_base(self):
class CustomSchema(AutoSchema):
def get_operation_id_base(self, action):
def get_operation_id_base(self, path, method, action):
return 'Item'
path = '/'