ITEP-87119: Update API spec to match REST implementation#1424
Conversation
|
@daddo-intel Get all endpoints are missing (/scenes, /cameras,...etc) |
…github.com/open-edge-platform/scenescape into fix/ITEP-87119-update-api-spec-web-service
ltalarcz
left a comment
There was a problem hiding this comment.
Review: API Spec Migration (Swagger 2.0 → OpenAPI 3.0.3)
Recommendation: Request Changes
OpenAPI 3.0.3 syntax is valid (passes openapi-spec-validator), but there are still some gaps vs the actual Django implementation.
Must Fix
-
Security is wrong on 2 endpoints:
/import-scene/— spec says no auth (security: []), but code requires Token auth (request.auth.keyis used)/save-geospatial-snapshot/— spec says no auth, but code has@login_required
-
3 endpoints completely missing from spec:
GET /database-ready— health checkPOST /calculateintrinsics— camera intrinsics calculationPOST /aclcheck— MQTT ACL check
-
POST method missing on all list endpoints (
/scenes,/cameras,/sensors,/regions,/tripwires,/users,/assets,/calibrationmarkers,/scenes/child) — spec only shows GET, butListCreateAPIViewalso handles POST (create).
Should Fix
-
Filter query params undocumented — list endpoints accept
name,parent,scene,username,idfilters, onlypageis in spec. -
UID parameter names are misleading:
/user/{uid}→ should be/user/{username}(lookup is by username)/camera/{uid},/sensor/{uid}→ actual lookup is bysensor_id/calibrationmarker/{uid}→ actual lookup is bymarker_id
|
5cc2e36 to
a55c4c3
Compare
📝 Description
Provide a clear summary of the changes and the context behind them. Describe what was changed, why it was needed, and how the changes address the issue or add value.
✨ Type of Change
Select the type of change your PR introduces:
🧪 Testing Scenarios
Describe how the changes were tested and how reviewers can test them too:
✅ Checklist
Before submitting the PR, ensure the following: