|
|
@ -347,6 +347,84 @@ hadis_detail_swagger = swagger_auto_schema( |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Swagger documentation for HadisCollectionListView |
|
|
|
|
|
hadis_collections_swagger = swagger_auto_schema( |
|
|
|
|
|
operation_description="Get list of all active hadis collections for browsing and categorization", |
|
|
|
|
|
operation_summary="List Hadis Collections", |
|
|
|
|
|
operation_id="getHadisCollections", |
|
|
|
|
|
tags=['Hadis'], |
|
|
|
|
|
responses={ |
|
|
|
|
|
status.HTTP_200_OK: openapi.Response( |
|
|
|
|
|
description="List of hadis collections", |
|
|
|
|
|
examples={ |
|
|
|
|
|
"application/json": [ |
|
|
|
|
|
{ |
|
|
|
|
|
"id": 1, |
|
|
|
|
|
"title": "Collection Title", |
|
|
|
|
|
"description": "Collection description", |
|
|
|
|
|
"order": 1, |
|
|
|
|
|
"status": True |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
status.HTTP_500_INTERNAL_SERVER_ERROR: openapi.Response( |
|
|
|
|
|
description="Internal server error" |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Swagger documentation for HadisInfoView |
|
|
|
|
|
hadis_info_swagger = swagger_auto_schema( |
|
|
|
|
|
operation_description="Get statistical information about hadis database including counts of categories, references, bookmarks, and narrators", |
|
|
|
|
|
operation_summary="Get Hadis Statistics", |
|
|
|
|
|
operation_id="getHadisInfo", |
|
|
|
|
|
tags=['Hadis'], |
|
|
|
|
|
responses={ |
|
|
|
|
|
status.HTTP_200_OK: openapi.Response( |
|
|
|
|
|
description="Hadis database statistics", |
|
|
|
|
|
examples={ |
|
|
|
|
|
"application/json": { |
|
|
|
|
|
"category_count": 25, |
|
|
|
|
|
"reference_count": 150, |
|
|
|
|
|
"bookmark_count": 75, |
|
|
|
|
|
"narrator_count": 200 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
status.HTTP_500_INTERNAL_SERVER_ERROR: openapi.Response( |
|
|
|
|
|
description="Internal server error" |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Swagger documentation for HadisSyncView |
|
|
|
|
|
hadis_sync_swagger = swagger_auto_schema( |
|
|
|
|
|
operation_description="Get complete hadis data for offline synchronization including all categories, hadis, and related information", |
|
|
|
|
|
operation_summary="Sync Hadis Data", |
|
|
|
|
|
operation_id="syncHadisData", |
|
|
|
|
|
tags=['Hadis'], |
|
|
|
|
|
responses={ |
|
|
|
|
|
status.HTTP_200_OK: openapi.Response( |
|
|
|
|
|
description="Complete hadis data for synchronization", |
|
|
|
|
|
examples={ |
|
|
|
|
|
"application/json": { |
|
|
|
|
|
"categories": [], |
|
|
|
|
|
"hadis": [], |
|
|
|
|
|
"references": [], |
|
|
|
|
|
"transmitters": [] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
status.HTTP_500_INTERNAL_SERVER_ERROR: openapi.Response( |
|
|
|
|
|
description="Internal server error" |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Swagger documentation for TransmitterView |
|
|
# Swagger documentation for TransmitterView |
|
|
transmitter_list_swagger = swagger_auto_schema( |
|
|
transmitter_list_swagger = swagger_auto_schema( |
|
|
operation_description="Get list of transmitters (narrators) with optional filtering by status, madhhab, and generation", |
|
|
operation_description="Get list of transmitters (narrators) with optional filtering by status, madhhab, and generation", |
|
|
|