No operations defined in spec

Hello!
my Swagger return “No operations defined in spec”.

i have this code in my url :

from django.contrib import admin
from django.urls import path, include, re_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="Testing",
     default_version='v1',
     description="Doc Integration",
  ),
  public=True,
  permission_classes=(permissions.AllowAny,),
)

urlpatterns = [
   path('admin/', admin.site.urls),
   path('api/v1/', include('viseoAccount.urls')),
   path('api/v1/', include('viseoApi.urls')),
   path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
   path('redoc', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
]

someone can help me please

Side note: When posting code here, enclose the code between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted.

1 Like

it is well noted. thank you for this comment