Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull Request Overview
This PR aligns DORA API routes with the versioned /api/v1/dora/ prefix to establish a consistent API versioning strategy across the platform. The change ensures all DORA endpoints follow the same versioning pattern as other API modules (users, configuration, dashboard, etc.).
Key Changes:
- Updated URL routing from
/api/dora/to/api/v1/dora/in the main urlpatterns - Refreshed all docstrings in views to document the new versioned endpoints
- Updated frontend fetch calls in the dashboard template to use versioned paths
- Modified data catalog and ecosystem metadata to reference the new endpoint structure
- Added routing regression tests to enforce versioned-only access
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
api/callcentersite/callcentersite/urls.py |
Updated DORA route from /api/dora/ to /api/v1/dora/ prefix; accidentally removed users.urls line |
api/callcentersite/tests/integration/test_dora_versioning.py |
New routing tests validate versioned endpoint availability and unversioned endpoint rejection; test coverage could be expanded |
api/callcentersite/dora_metrics/views.py |
Updated all docstrings (26 functions) from /api/dora/ to /api/v1/dora/ for consistency |
api/callcentersite/dora_metrics/templates/dora_metrics/dashboard.html |
Updated all fetch calls to chart endpoints to use /api/v1/dora/charts/ prefix |
api/callcentersite/dora_metrics/data_catalog.py |
Updated API endpoint references and example query URLs in dataset descriptors to use versioned paths |
api/callcentersite/dora_metrics/data_ecosystem.py |
Updated endpoint references in data lineage map to reflect versioned API structure |
Comments suppressed due to low confidence (7)
api/callcentersite/dora_metrics/data_catalog.py:9
- Import of 'datetime' is not used.
from datetime import datetime, timedelta
api/callcentersite/dora_metrics/data_catalog.py:10
- Import of 'List' is not used.
from typing import Dict, List, Any, Optional
api/callcentersite/dora_metrics/data_catalog.py:12
- Import of 'Count' is not used.
from django.db.models import Avg, Count, Max, Min, Q
api/callcentersite/dora_metrics/data_ecosystem.py:14
- Import of 'datetime' is not used.
from datetime import datetime, timedelta
api/callcentersite/dora_metrics/data_ecosystem.py:15
- Import of 'Optional' is not used.
from typing import Dict, List, Any, Optional
api/callcentersite/dora_metrics/data_ecosystem.py:17
- Import of 'Max' is not used.
Import of 'Min' is not used.
Import of 'Count' is not used.
Import of 'Avg' is not used.
from django.db.models import Count, Avg, Max, Min, Q
api/callcentersite/dora_metrics/views.py:6
- Import of 'datetime' is not used.
from datetime import datetime, timedelta
| path("api/v1/llamadas/", include("callcentersite.apps.llamadas.urls")), | ||
| path("api/v1/", include("callcentersite.apps.users.urls")), | ||
| path("api/dora/", include("dora_metrics.urls")), | ||
| path("api/v1/dora/", include("dora_metrics.urls")), |
There was a problem hiding this comment.
The removal of the users.urls line appears to be unintentional. This line includes user-related API routes at /api/v1/ and should not be removed as part of the DORA API versioning changes.
The current file still has this line at line 23:
path("api/v1/", include("callcentersite.apps.users.urls")),This should be kept in the urlpatterns to maintain user authentication and management endpoints.
Summary
/api/v1/dora/prefixTesting
Codex Task