mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 00:49:49 +03:00
fix(openapi): remove duplicatde __init__
This commit is contained in:
parent
03d3406734
commit
c87837b025
|
@ -71,10 +71,14 @@ class SchemaGenerator(BaseSchemaGenerator):
|
|||
|
||||
class AutoSchema(ViewInspector):
|
||||
|
||||
def __init__(self, tags=None):
|
||||
def __init__(self, operation_id_base=None, tags=None):
|
||||
"""
|
||||
:param operation_id_base: user-defined name in operationId. If empty, it will be deducted from the Model/Serializer/View name.
|
||||
"""
|
||||
if tags and not all(isinstance(tag, str) for tag in tags):
|
||||
raise ValueError('tags must be a list or tuple of string.')
|
||||
self._tags = tags
|
||||
self.operation_id_base = operation_id_base
|
||||
super().__init__()
|
||||
|
||||
request_media_types = []
|
||||
|
@ -88,13 +92,6 @@ class AutoSchema(ViewInspector):
|
|||
'delete': 'Destroy',
|
||||
}
|
||||
|
||||
def __init__(self, operation_id_base=None):
|
||||
"""
|
||||
:param operation_id_base: user-defined name in operationId. If empty, it will be deducted from the Model/Serializer/View name.
|
||||
"""
|
||||
super().__init__()
|
||||
self.operation_id_base = operation_id_base
|
||||
|
||||
def get_operation(self, path, method):
|
||||
operation = {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user