Enhance API structure and documentation: Added new tags for Account, Integration, Automation, Linker, Optimizer, and Publisher; updated billing endpoints for admin and customer; improved API reference documentation; fixed endpoint paths in frontend services.
This commit is contained in:
@@ -11,6 +11,7 @@ from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.utils.decorators import method_decorator
|
||||
from drf_spectacular.utils import extend_schema, extend_schema_view
|
||||
|
||||
from igny8_core.api.base import SiteSectorModelViewSet
|
||||
from igny8_core.api.permissions import IsAuthenticatedAndActive, IsEditorOrAbove
|
||||
@@ -20,6 +21,14 @@ from igny8_core.business.publishing.models import PublishingRecord, DeploymentRe
|
||||
from igny8_core.business.publishing.services.publisher_service import PublisherService
|
||||
|
||||
|
||||
@extend_schema_view(
|
||||
list=extend_schema(tags=['Publisher']),
|
||||
create=extend_schema(tags=['Publisher']),
|
||||
retrieve=extend_schema(tags=['Publisher']),
|
||||
update=extend_schema(tags=['Publisher']),
|
||||
partial_update=extend_schema(tags=['Publisher']),
|
||||
destroy=extend_schema(tags=['Publisher']),
|
||||
)
|
||||
class PublishingRecordViewSet(SiteSectorModelViewSet):
|
||||
"""
|
||||
ViewSet for PublishingRecord model.
|
||||
@@ -41,6 +50,14 @@ class PublishingRecordViewSet(SiteSectorModelViewSet):
|
||||
return PublishingRecordSerializer
|
||||
|
||||
|
||||
@extend_schema_view(
|
||||
list=extend_schema(tags=['Publisher']),
|
||||
create=extend_schema(tags=['Publisher']),
|
||||
retrieve=extend_schema(tags=['Publisher']),
|
||||
update=extend_schema(tags=['Publisher']),
|
||||
partial_update=extend_schema(tags=['Publisher']),
|
||||
destroy=extend_schema(tags=['Publisher']),
|
||||
)
|
||||
class DeploymentRecordViewSet(SiteSectorModelViewSet):
|
||||
"""
|
||||
ViewSet for DeploymentRecord model.
|
||||
@@ -63,6 +80,7 @@ class DeploymentRecordViewSet(SiteSectorModelViewSet):
|
||||
return DeploymentRecordSerializer
|
||||
|
||||
|
||||
@extend_schema_view()
|
||||
class PublisherViewSet(viewsets.ViewSet):
|
||||
"""
|
||||
Publisher actions for publishing content.
|
||||
@@ -76,6 +94,7 @@ class PublisherViewSet(viewsets.ViewSet):
|
||||
super().__init__(**kwargs)
|
||||
self.publisher_service = PublisherService()
|
||||
|
||||
@extend_schema(tags=['Publisher'])
|
||||
@action(detail=False, methods=['post'], url_path='publish')
|
||||
def publish(self, request):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user