43 lines
1.2 KiB
Python
43 lines
1.2 KiB
Python
"""
|
|
SNS API Schemas
|
|
|
|
Instagram 업로드 관련 Pydantic 스키마를 정의합니다.
|
|
"""
|
|
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class InstagramUploadResponse(BaseModel):
|
|
"""Instagram 업로드 상태 응답 스키마
|
|
|
|
Usage:
|
|
GET /sns/instagram/upload/{task_id}
|
|
Instagram 업로드 작업의 상태를 반환합니다.
|
|
|
|
Example Response:
|
|
{
|
|
"task_id": "0694b716-dbff-7219-8000-d08cb5fce431",
|
|
"state": "pending",
|
|
"message": "업로드 대기 중입니다.",
|
|
"error": null
|
|
}
|
|
"""
|
|
|
|
model_config = ConfigDict(
|
|
json_schema_extra={
|
|
"example": {
|
|
"task_id": "0694b716-dbff-7219-8000-d08cb5fce431",
|
|
"state": "pending",
|
|
"message": "업로드 대기 중입니다.",
|
|
"error": None,
|
|
}
|
|
}
|
|
)
|
|
|
|
task_id: str = Field(..., description="작업 고유 식별자")
|
|
state: str = Field(..., description="업로드 상태 (pending, processing, completed, failed)")
|
|
message: str = Field(..., description="상태 메시지")
|
|
error: Optional[str] = Field(default=None, description="에러 메시지 (실패 시)")
|