      def map_renderers(self, path, method):
          media_types = []
          for renderer in self.view.renderer_classes:
              # BrowsableAPIRenderer not relevant to OpenAPI spec
              if renderer == renderers.BrowsableAPIRenderer:
                  continue
              media_types.append(renderer.media_type)
          return media_types
  
      def get_serializer(self, path, method):
 
</s> remove         assert len(success_response['content'].keys()) == 1
        assert 'application/json' in success_response['content']
 </s> add         # Check that the API renderers aren't included, but custom renderers are
        assert set(success_response['content']) == {'application/json', 'text/plain'} </s> remove             renderer_classes = [JSONRenderer]
 </s> add             renderer_classes = [JSONRenderer, TextRenderer, BrowsableAPIRenderer, CustomBrowsableAPIRenderer] </s> remove from rest_framework.renderers import JSONRenderer, OpenAPIRenderer
 </s> add from rest_framework.renderers import (
    BaseRenderer, BrowsableAPIRenderer, JSONRenderer, OpenAPIRenderer
)
            if issubclass(renderer, renderers.BrowsableAPIRenderer):
      def map_renderers(self, path, method):
          media_types = []
          for renderer in self.view.renderer_classes:
              # BrowsableAPIRenderer not relevant to OpenAPI spec
            if issubclass(renderer, renderers.BrowsableAPIRenderer):
                  continue
              media_types.append(renderer.media_type)
          return media_types
  
      def get_serializer(self, path, method):
keep keep keep keep replace keep keep keep keep keep
 Ignore derivations of BrowsableAPIRenderer in OpenAPI schema (#7497)

* Ignore derivations of BrowsableAPIRenderer in OpenAPI schema
* Improve test_renderer_mapping test

Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> 
rest_framework/schemas/openapi.py