          list_name = self.routes[0].name
          for prefix, viewset, basename in self.registry:
              api_root_dict[prefix] = list_name.format(basename=basename)
  
          class APIRoot(views.APIView):
              _ignore_model_permissions = True
              renderer_classes = view_renderers
  
              def get(self, request, *args, **kwargs):
                  if request.accepted_renderer.media_type in schema_media_types:
 
</s> remove     def get_api_root_view(self):
 </s> add     def get_api_root_view(self, schema_urls=None):
        view_renderers = list(api_settings.DEFAULT_RENDERER_CLASSES)
        schema_media_types = []

        if schema_urls and self.schema_title:
            view_renderers += list(self.schema_renderers)
            schema_generator = SchemaGenerator(
                title=self.schema_title,
                patterns=schema_urls
            )
            schema_media_types = [
                renderer.media_type
                for renderer in self.schema_renderers
            ]

          list_name = self.routes[0].name
          for prefix, viewset, basename in self.registry:
              api_root_dict[prefix] = list_name.format(basename=basename)
  
        view_renderers = list(api_settings.DEFAULT_RENDERER_CLASSES)
        schema_media_types = []

        if schema_urls and self.schema_title:
            view_renderers += list(self.schema_renderers)
            schema_generator = SchemaGenerator(
                title=self.schema_title,
                patterns=schema_urls
            )
            schema_media_types = [
                renderer.media_type
                for renderer in self.schema_renderers
            ]

          class APIRoot(views.APIView):
              _ignore_model_permissions = True
              renderer_classes = view_renderers
  
              def get(self, request, *args, **kwargs):
                  if request.accepted_renderer.media_type in schema_media_types:
keep keep keep add keep keep keep keep keep keep
 Schemas & client libraries. (#4179)

* Added schema generation support.
* New tutorial section.
* API guide on schema generation.
* Topic guide on API clients. 
rest_framework/routers.py