Skip to content

Commit 67d57af

Browse files
Copilotnolan1999
andcommitted
Add example to JobUpdate schema and complete OpenAPI compliance
Co-authored-by: nolan1999 <54246789+nolan1999@users.noreply.github.com>
1 parent 00f3bbe commit 67d57af

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

api/schemas/job_update.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ class JobUpdate(BaseModel):
77
job_id: int
88
status: JobStates
99
runtime_details: str | None = None
10+
11+
class Config:
12+
schema_extra = {
13+
"example": {
14+
"job_id": 12345,
15+
"status": "finished",
16+
"runtime_details": "Job completed successfully in 45 minutes"
17+
}
18+
}

0 commit comments

Comments
 (0)