5019b10584
POST /api/v1/slabs accepts multipart/form-data with: - data: JSON-encoded SlabCreate payload - files[]: original image files (1-5 photos) - meta[]: JSON-encoded photo metadata objects Returns 201 with status: calibrated and server_rev: 1. Server stores client-sent numbers only (sqft, bdft, widths) without server-side recompute. Client is authoritative for deterministic math. Includes: - SlabCreateData Pydantic model mirroring OPENAPI.md SlabCreate schema - PhotoMeta model for photo metadata validation - SlabRead/PhotoRead response models - File storage with configurable images directory (temp fallback for tests) - Duplicate SKU detection (409) - python-multipart added to requirements.txt D-1 test coverage (8 tests, all green): - 201 response on valid multipart upload - status: calibrated in response - server_rev: 1 in response - Full response shape assertion - Multiple photos handling - Missing data field returns 400 - Duplicate SKU returns 409 - TestClient lifespan management (FUND-9) Evidence: pytest tests/ -v → 31 passed, 0 failed
12 lines
231 B
Plaintext
12 lines
231 B
Plaintext
fastapi>=0.115,<1
|
|
uvicorn[standard]>=0.34,<1
|
|
sqlalchemy>=2.0,<3
|
|
aiosqlite>=0.20,<1
|
|
alembic>=1.14,<2
|
|
httpx>=0.28,<1
|
|
pydantic>=2.9,<3
|
|
pydantic-settings>=2.7,<3
|
|
python-dotenv>=1.0,<2
|
|
cryptography>=43.0,<45
|
|
python-multipart>=0.0.30,<1
|