diff --git a/endpoints/api/long-description.post.py b/endpoints/api/long-description.post.py new file mode 100644 index 0000000..b1fb3da --- /dev/null +++ b/endpoints/api/long-description.post.py @@ -0,0 +1,35 @@ +from fastapi import APIRouter, Depends, HTTPException +from core.database import fake_users_db +import uuid + +router = APIRouter() + +@router.post("/api/long-description") +async def long_description_handler( + content: str = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +): + """Handle very long description demo endpoint""" + request_id = str(uuid.uuid4()) + + if len(content) < 100: + raise HTTPException(status_code=400, detail="Content must be at least 100 characters long") + + fake_users_db[request_id] = { + "id": request_id, + "content": content, + "length": len(content), + "timestamp": "2024-01-01T00:00:00Z" + } + + return { + "message": "Long description processed successfully", + "request_id": request_id, + "stats": { + "content_length": len(content), + "processed_at": "2024-01-01T00:00:00Z" + }, + "next_steps": [ + "Review processed content", + "Check content statistics" + ] + } \ No newline at end of file