Browse Source

swagger doc updated

master
Mohsen Taba 2 weeks ago
parent
commit
4cb06276d3
  1. 7
      apps/hadis/views/transmitter.py

7
apps/hadis/views/transmitter.py

@ -361,6 +361,7 @@ class NarratorArgumentsListView(ListAPIView):
# }) # })
from django.db.models import Exists, OuterRef # 👈 حتما این دو را ایمپورت کنید from django.db.models import Exists, OuterRef # 👈 حتما این دو را ایمپورت کنید
from drf_yasg import openapi
class NarratorTeachersView(ListAPIView): class NarratorTeachersView(ListAPIView):
""" """
@ -376,6 +377,9 @@ class NarratorTeachersView(ListAPIView):
operation_summary="Get Narrator Teachers", operation_summary="Get Narrator Teachers",
operation_description="Analyzes transmission chains to find the teachers (order + 1) of a narrator, with optional search.", operation_description="Analyzes transmission chains to find the teachers (order + 1) of a narrator, with optional search.",
tags=['Dobodbi - Hadis (V2)'], 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): def get(self, request, *args, **kwargs):
return super().get(request, *args, **kwargs) return super().get(request, *args, **kwargs)
@ -423,6 +427,9 @@ class NarratorStudentsView(ListAPIView):
operation_summary="Get Narrator Students", operation_summary="Get Narrator Students",
operation_description="Analyzes transmission chains to find the students (order - 1) of a narrator, with optional search.", operation_description="Analyzes transmission chains to find the students (order - 1) of a narrator, with optional search.",
tags=['Dobodbi - Hadis (V2)'], 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): def get(self, request, *args, **kwargs):
return super().get(request, *args, **kwargs) return super().get(request, *args, **kwargs)

Loading…
Cancel
Save