class UserCreate(BaseModel): model_config = ConfigDict(from_attributes=True) username: str = Field(..., min_length=3) email: str
</pydantic_v2>
<dependency_injection>
```python
@router.post("/", response_model=ShowUser)
async def create_user(
user_in: UserCreate,
db: AsyncSession = Depends(get_db),
current_user: User = Depends(get_current_active_user)
):
return await UserService.create(db, user_in)