          class ExampleView(generics.DestroyAPIView):
              schema = AutoSchema(operation_id_base='example')
  
          url_patterns = [
              url(r'^example/?$', ExampleView.as_view()),
          ]
          generator = SchemaGenerator(patterns=url_patterns)
          schema = generator.get_schema(request=create_request('/'))
          assert 'components' not in schema
          assert 'content' not in schema['paths']['/example/']['delete']['responses']['204']
 
</s> remove             url(r'^test/?$', ExampleStringTagsViewSet.as_view()),
 </s> add             path('test/', ExampleStringTagsViewSet.as_view()), </s> remove             url(r'^any-dash_underscore/?$', RestaurantAPIView.as_view()),
            url(r'^restaurants/branches/?$', BranchAPIView.as_view())
 </s> add             path('any-dash_underscore/', RestaurantAPIView.as_view()),
            path('restaurants/branches/', BranchAPIView.as_view()) </s> remove             url(r'^api-token-auth/', obtain_auth_token)
 </s> add             path('api-token-auth/', obtain_auth_token) </s> remove             url(r'^example/?$', views.ExampleListView.as_view()),
            url(r'^example/{pk}/?$', views.ExampleDetailView.as_view()),
 </s> add             path('example/', views.ExampleListView.as_view()),
            path('example/{pk}/', views.ExampleDetailView.as_view()), </s> remove             url(r'example/(?P<pk>\d+)/$', BasicNamingCollisionView.as_view()),
            url(r'example/(?P<slug>\w+)/$', BasicNamingCollisionView.as_view()),
 </s> add             path('example/<int:pk>/', BasicNamingCollisionView.as_view()),
            path('example/<str:slug>/', BasicNamingCollisionView.as_view()),
            path('example/', ExampleView.as_view()),
          class ExampleView(generics.DestroyAPIView):
              schema = AutoSchema(operation_id_base='example')
  
          url_patterns = [
            path('example/', ExampleView.as_view()),
          ]
          generator = SchemaGenerator(patterns=url_patterns)
          schema = generator.get_schema(request=create_request('/'))
          assert 'components' not in schema
          assert 'content' not in schema['paths']['/example/']['delete']['responses']['204']
keep keep keep keep 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_openapi.py