  
          api_endpoints = []
  
          for pattern in patterns:
              path_regex = prefix + get_original_route(pattern)
              if isinstance(pattern, URLPattern):
                  path = self.get_path_from_regex(path_regex)
                  callback = pattern.callback
                  if self.should_include_endpoint(path, callback):
                      for method in self.get_allowed_methods(callback):
 
</s> remove             if is_route_pattern(urlpattern):
 </s> add             if isinstance(urlpattern.pattern, RoutePattern): </s> remove             regex = get_regex_pattern(urlpattern).rstrip('$').rstrip('/') + suffix_pattern
 </s> add             regex = urlpattern.pattern.regex.pattern.rstrip('$').rstrip('/') + suffix_pattern </s> remove             regex = get_regex_pattern(urlpattern)
 </s> add             regex = urlpattern.pattern.regex.pattern </s> remove             if is_route_pattern(urlpattern):
 </s> add             if isinstance(urlpattern.pattern, RoutePattern): </s> remove         pairs = [(inspector.get_path_from_regex(get_regex_pattern(pattern)), pattern.callback)
 </s> add         pairs = [(inspector.get_path_from_regex(pattern.pattern.regex.pattern), pattern.callback)
            path_regex = prefix + str(pattern.pattern)
  
          api_endpoints = []
  
          for pattern in patterns:
            path_regex = prefix + str(pattern.pattern)
              if isinstance(pattern, URLPattern):
                  path = self.get_path_from_regex(path_regex)
                  callback = pattern.callback
                  if self.should_include_endpoint(path, callback):
                      for method in self.get_allowed_methods(callback):
keep keep keep keep replace keep keep keep keep keep
 Drop all compat support to Django < 2 urls (#7337) 
rest_framework/schemas/generators.py