Phase 5.14: API documentation - OpenAPI tags, response models, examples, docs
This commit is contained in:
+5
-5
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user