2025-03-19 18:18:01 +00:00

38 lines
871 B
Python

from fastapi import APIRouter, Depends, HTTPException
from core.database import fake_users_db
import uuid
router = APIRouter()
@router.post("/yellow")
async def yellow_handler(
name: str = "default_name",
color: str = "yellow",
size: int = 10
):
"""Demo yellow endpoint"""
item_id = str(uuid.uuid4())
new_item = {
"id": item_id,
"name": name,
"color": color,
"size": size,
"created_at": "2024-01-01T00:00:00Z"
}
fake_users_db[item_id] = new_item
return {
"message": "Yellow item created successfully",
"data": new_item,
"metadata": {
"status": "active",
"version": "1.0",
"created_by": "system"
},
"next_steps": [
"Configure item properties",
"Add to collection"
]
}