diff --git a/apps/hadis/views/transmitter.py b/apps/hadis/views/transmitter.py index 53880c0..b3d2520 100644 --- a/apps/hadis/views/transmitter.py +++ b/apps/hadis/views/transmitter.py @@ -361,6 +361,7 @@ class NarratorArgumentsListView(ListAPIView): # }) from django.db.models import Exists, OuterRef # 👈 حتما این دو را ایمپورت کنید +from drf_yasg import openapi class NarratorTeachersView(ListAPIView): """ @@ -376,6 +377,9 @@ class NarratorTeachersView(ListAPIView): operation_summary="Get Narrator Teachers", operation_description="Analyzes transmission chains to find the teachers (order + 1) of a narrator, with optional search.", tags=['Dobodbi - Hadis (V2)'], + manual_parameters=[ + openapi.Parameter('search', openapi.IN_QUERY, description="Search term for narrator's name", type=openapi.TYPE_STRING), + ] ) def get(self, request, *args, **kwargs): return super().get(request, *args, **kwargs) @@ -423,6 +427,9 @@ class NarratorStudentsView(ListAPIView): operation_summary="Get Narrator Students", operation_description="Analyzes transmission chains to find the students (order - 1) of a narrator, with optional search.", tags=['Dobodbi - Hadis (V2)'], + manual_parameters=[ + openapi.Parameter('search', openapi.IN_QUERY, description="Search term for narrator's name", type=openapi.TYPE_STRING), + ] ) def get(self, request, *args, **kwargs): return super().get(request, *args, **kwargs)