      'DEFAULT_PAGINATION_CLASS': None,
      'DEFAULT_FILTER_BACKENDS': (),
  
      # Schema
      'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema',
  
      # Throttling
      'DEFAULT_THROTTLE_RATES': {
          'user': None,
          'anon': None,
 
</s> remove         assert coreapi is not None, 'coreapi must be installed.'

        generator = SchemaGenerator(
 </s> add         generator_class = self.get_generator_class()
        generator = generator_class( </s> remove         parser.add_argument('--format', dest="format", choices=['openapi', 'openapi-json', 'corejson'], default='openapi', type=str)
 </s> add         if self.get_mode() == COREAPI_MODE:
            parser.add_argument('--format', dest="format", choices=['openapi', 'openapi-json', 'corejson'], default='openapi', type=str)
        else:
            parser.add_argument('--format', dest="format", choices=['openapi', 'openapi-json'], default='openapi', type=str) </s> remove INSERT_INTO_COLLISION_FMT = """
Schema Naming Collision.

coreapi.Link for URL path {value_url} cannot be inserted into schema.
Position conflicts with coreapi.Link for URL path {target_url}.

Attempted to insert link with keys: {keys}.

Adjust URLs to avoid naming collision or override `SchemaGenerator.get_keys()`
to customise schema structure.
"""


class LinkNode(OrderedDict):
    def __init__(self):
        self.links = []
        self.methods_counter = Counter()
        super().__init__()

    def get_available_key(self, preferred_key):
        if preferred_key not in self:
            return preferred_key

        while True:
            current_val = self.methods_counter[preferred_key]
            self.methods_counter[preferred_key] += 1

            key = '{}_{}'.format(preferred_key, current_val)
            if key not in self:
                return key


def insert_into(target, keys, value):
    """
    Nested dictionary insertion.

    >>> example = {}
    >>> insert_into(example, ['a', 'b', 'c'], 123)
    >>> example
    LinkNode({'a': LinkNode({'b': LinkNode({'c': LinkNode(links=[123])}}})))
    """
    for key in keys[:-1]:
        if key not in target:
            target[key] = LinkNode()
        target = target[key]

    try:
        target.links.append((keys[-1], value))
    except TypeError:
        msg = INSERT_INTO_COLLISION_FMT.format(
            value_url=value.url,
            target_url=target.url,
            keys=keys
        )
        raise ValueError(msg)


def distribute_links(obj):
    for key, value in obj.items():
        distribute_links(value)

    for preferred_key, link in obj.links:
        key = obj.get_available_key(preferred_key)
        obj[key] = link


def is_custom_action(action):
    return action not in {
        'retrieve', 'list', 'create', 'update', 'partial_update', 'destroy'
    }


 </s> add 
    'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.openapi.AutoSchema',
      'DEFAULT_PAGINATION_CLASS': None,
      'DEFAULT_FILTER_BACKENDS': (),
  
      # Schema
    'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.openapi.AutoSchema',
  
      # Throttling
      'DEFAULT_THROTTLE_RATES': {
          'user': None,
          'anon': None,
keep keep keep keep replace keep keep keep keep keep
 Added OpenAPI Schema Generation. (#6532)

Co-authored-by: Lucidiot <lucidiot@protonmail.com>
Co-authored-by: dongfangtianyu <dongfangtianyu@qq.com> 
rest_framework/settings.py