feat(api): add unified response format utilities (Section 1, Step 1.1-1.3)

- Create response.py with success_response(), error_response(), paginated_response()
- Add unit tests for all response utility functions
- Create /api/ping/ health check endpoint using new format
- Update __init__.py to export response functions
- All changes are non-breaking - existing code unaffected

This implements Section 1 Task 1 from API-IMPLEMENTATION-PLAN-SECTION1.md
Ready for testing before applying to existing endpoints.

Ref: unified-api/API-IMPLEMENTATION-PLAN-SECTION1.md
This commit is contained in:
Desktop
2025-11-14 20:05:22 +05:00
parent 069e0a24d8
commit a722f6caa3
6 changed files with 352 additions and 0 deletions

View File

@@ -16,9 +16,11 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path, include
from igny8_core.api.views import PingView
urlpatterns = [
path('admin/', admin.site.urls),
path('api/ping/', PingView.as_view(), name='ping'), # Health check endpoint
path('api/v1/auth/', include('igny8_core.auth.urls')), # Auth endpoints
path('api/v1/planner/', include('igny8_core.modules.planner.urls')),
path('api/v1/writer/', include('igny8_core.modules.writer.urls')),