  
  router = DefaultRouter()
  router.register('example', ExampleViewSet, basename='example')
  urlpatterns = [
      url(r'^$', schema_view),
      url(r'^', include(router.urls))
  ]
  
  
  @unittest.skipUnless(coreapi, 'coreapi is not installed')
  @override_settings(ROOT_URLCONF=__name__, REST_FRAMEWORK={'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema'})
 
</s> remove             url(r'^', include(router.urls))
 </s> add             path('', include(router.urls)) </s> remove             url('^example/?$', views.ExampleListView.as_view()),
            url(r'^', include(router.urls))
 </s> add             path('example/', views.ExampleListView.as_view()),
            path('', include(router.urls)) </s> remove     url(r'^$', SchemaView.as_view()),
    url(r'^example/$', ListView.as_view()),
    url(r'^example/(?P<id>[0-9]+)/$', DetailView.as_view()),
    url(r'^upload/$', UploadView.as_view()),
    url(r'^download/$', DownloadView.as_view()),
    url(r'^text/$', TextView.as_view()),
    url(r'^headers/$', HeadersView.as_view()),
 </s> add     path('', SchemaView.as_view()),
    path('example/', ListView.as_view()),
    re_path(r'^example/(?P<id>[0-9]+)/$', DetailView.as_view()),
    path('upload/', UploadView.as_view()),
    path('download/', DownloadView.as_view()),
    path('text/', TextView.as_view()),
    path('headers/', HeadersView.as_view()), </s> remove         url(r'^$', view),
 </s> add         path('', view), </s> remove         url('^$', schema_view),
        url(r'^', include(router.urls)),
 </s> add         path('', schema_view),
        path('', include(router.urls)),
    path('', schema_view),
    path('', include(router.urls))
  
  router = DefaultRouter()
  router.register('example', ExampleViewSet, basename='example')
  urlpatterns = [
    path('', schema_view),
    path('', include(router.urls))
    path('', schema_view),
    path('', include(router.urls))
  ]
  
  
  @unittest.skipUnless(coreapi, 'coreapi is not installed')
  @override_settings(ROOT_URLCONF=__name__, REST_FRAMEWORK={'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema'})
keep keep keep keep replace replace keep keep keep keep keep
 Replace all url() calls with path() or re_path() (#7512)

* url() is deprecated in Django 3.1

* update given feedbacks on url() is deprecated in Django 3.1

* Fix test_urlpatterns.py to continue testing mixed re_path() and path()

* Fix one missed reference

Co-authored-by: sanjusci <sanju.sci9@gmail.com> 
tests/schemas/test_coreapi.py