17 lines
512 B
Python
17 lines
512 B
Python
from typing import List
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class HTTPError(BaseModel):
|
|
detail: str = Field(..., description="Error message")
|
|
|
|
|
|
class ValidationError(BaseModel):
|
|
loc: List[str] = Field(..., description="Location of validation error")
|
|
msg: str = Field(..., description="Validation error message")
|
|
type: str = Field(..., description="Validation error type")
|
|
|
|
|
|
class HTTPValidationError(BaseModel):
|
|
detail: List[ValidationError] = Field(..., description="Validation errors") |