feat: Phase 3 - CRUD core for Techniques, Tests and Evidence (T-014 to T-017)
- Add Pydantic schemas for Technique, Test and Evidence - Add CRUD endpoints for Techniques (list with filters, detail, create, update, review) - Add CRUD endpoints for Tests (create, detail, update, validate, reject) - Add evidence upload with SHA-256 integrity and presigned download URLs - Add MinIO/S3 storage client with bucket auto-creation on startup - Add status_service to recalculate technique coverage from test results - Add require_any_role RBAC dependency for multi-role authorization - Update README with API endpoints reference and project structure
This commit is contained in:
23
backend/app/schemas/evidence.py
Normal file
23
backend/app/schemas/evidence.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""Pydantic schemas for Evidence endpoints."""
|
||||
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class EvidenceOut(BaseModel):
|
||||
"""Representation of an evidence record returned by the API.
|
||||
|
||||
``download_url`` is a presigned URL generated at response time.
|
||||
"""
|
||||
|
||||
id: uuid.UUID
|
||||
test_id: uuid.UUID
|
||||
file_name: str
|
||||
sha256_hash: str
|
||||
uploaded_by: uuid.UUID | None = None
|
||||
uploaded_at: datetime | None = None
|
||||
download_url: str | None = None
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
Reference in New Issue
Block a user