Phase 5.14: API documentation - OpenAPI tags, response models, examples, docs

This commit is contained in:
Agent Zero
2026-07-23 22:44:54 +02:00
parent 3c1b2f227b
commit 66b6c32ed8
11 changed files with 716 additions and 28 deletions
+5 -5
View File
@@ -6,11 +6,11 @@ from pydantic import BaseModel, EmailStr, Field
class UserCreate(BaseModel):
email: EmailStr
name: str = Field(..., min_length=1, max_length=200)
password: str = Field(..., min_length=8)
role: str = Field(default="viewer")
role_id: str | None = Field(default=None, description="UUID of a custom Role")
email: EmailStr = Field(..., examples=["user@leocrm.local"])
name: str = Field(..., min_length=1, max_length=200, examples=["John Doe"])
password: str = Field(..., min_length=8, examples=["secure-password"])
role: str = Field(default="viewer", examples=["viewer"])
role_id: str | None = Field(default=None, description="UUID of a custom Role", examples=["550e8400-e29b-41d4-a716-446655440000"])
is_active: bool = True