To remove a specific URL endpoint in DRF-YASG version 1.21.4, you can use the exclude_urlpatterns parameter when defining your Swagger view. Here's an example:

from django.urls import path
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
    openapi.Info(
        title="API Documentation",
        default_version="v1",
        description="API documentation",
    ),
    public=True,
    permission_classes=(permissions.AllowAny,),
    exclude_urlpatterns=[path("admin/", admin.site.urls)],
)

urlpatterns = [
    path("api/docs/", schema_view.with_ui("swagger", cache_timeout=0), name="schema-swagger-ui"),
    # other URL patterns...
]

In this example, the exclude_urlpatterns parameter is set to exclude the admin/ URL endpoint from the Swagger documentation. You can add additional URL patterns to exclude as needed.