add chunking

This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-11-27 03:43:19 +02:00
parent 4f8c18a066
commit 2037870f67
43 changed files with 7041 additions and 4135 deletions
+16 -15
View File
@@ -31,7 +31,7 @@ The API is the primary interface for external clients to interact with the GPS-d
## Input Data
### Test Case 1: Create Flight
- **Endpoint**: POST /api/v1/flights
- **Endpoint**: POST /flights
- **Payload**:
```json
{
@@ -48,60 +48,61 @@ The API is the primary interface for external clients to interact with the GPS-d
- **Expected**: 201 Created, returns flight_id
### Test Case 2: Upload Single Image
- **Endpoint**: POST /api/v1/flights/{flight_id}/images
- **Endpoint**: POST /flights/{flightId}/images
- **Payload**: Multipart form-data with AD000001.jpg
- **Headers**: Content-Type: multipart/form-data
- **Expected**: 202 Accepted, processing started
### Test Case 3: Upload Multiple Images
- **Endpoint**: POST /api/v1/flights/{flight_id}/images/batch
- **Endpoint**: POST /flights/{flightId}/images/batch
- **Payload**: AD000001-AD000010 (10 images)
- **Expected**: 202 Accepted, all images queued
### Test Case 4: Get Flight Status
- **Endpoint**: GET /api/v1/flights/{flight_id}/status
- **Endpoint**: GET /flights/{flightId}
- **Expected**: 200 OK, returns processing status and statistics
### Test Case 5: Get Results
- **Endpoint**: GET /api/v1/flights/{flight_id}/results
- **Endpoint**: GET /flights/{flightId}/results
- **Query Params**: ?format=json&include_refined=true
- **Expected**: 200 OK, returns GPS coordinates for all processed images
### Test Case 6: Get Specific Image Result
- **Endpoint**: GET /api/v1/flights/{flight_id}/images/{image_id}/result
- **Endpoint**: GET /flights/{flightId}/results?image_id={imageId}
- **Expected**: 200 OK, returns detailed result for one image
### Test Case 7: Submit User Fix (AC-6)
- **Endpoint**: POST /api/v1/flights/{flight_id}/images/{image_id}/user_fix
- **Endpoint**: POST /flights/{flightId}/user-fix
- **Payload**:
```json
{
"gps": {"lat": 48.270334, "lon": 37.374442},
"confidence": "high"
"frame_id": 15,
"uav_pixel": [3126, 2084],
"satellite_gps": {"lat": 48.270334, "lon": 37.374442}
}
```
- **Expected**: 200 OK, system incorporates user fix
- **Expected**: 200 OK, system incorporates user fix, processing resumes
### Test Case 8: List Flights
- **Endpoint**: GET /api/v1/flights
- **Endpoint**: GET /flights
- **Query Params**: ?status=active&limit=10
- **Expected**: 200 OK, returns list of flights
### Test Case 9: Delete Flight
- **Endpoint**: DELETE /api/v1/flights/{flight_id}
- **Endpoint**: DELETE /flights/{flightId}
- **Expected**: 204 No Content, flight and associated data deleted
### Test Case 10: Error Handling - Invalid Input
- **Endpoint**: POST /api/v1/flights
- **Endpoint**: POST /flights
- **Payload**: Invalid JSON or missing required fields
- **Expected**: 400 Bad Request with error details
### Test Case 11: Error Handling - Not Found
- **Endpoint**: GET /api/v1/flights/nonexistent_id
- **Endpoint**: GET /flights/nonexistent_id
- **Expected**: 404 Not Found
### Test Case 12: SSE Connection
- **Endpoint**: GET /api/v1/flights/{flight_id}/stream
- **Endpoint**: GET /flights/{flightId}/stream
- **Headers**: Accept: text/event-stream
- **Expected**: 200 OK, establishes SSE stream for real-time updates