Skip to content

Commit d97fc57

Browse files
committed
Field for UnauthorizedResponse
1 parent af59e6d commit d97fc57

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/models/responses.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,11 @@ class AuthorizedResponse(BaseModel):
436436
class UnauthorizedResponse(BaseModel):
437437
"""Model representing response for missing or invalid credentials."""
438438

439-
detail: str
439+
detail: str = Field(
440+
...,
441+
description="Details about the authorization issue",
442+
examples=["Missing or invalid credentials provided by client"],
443+
)
440444

441445
# provides examples for /docs endpoint
442446
model_config = {

0 commit comments

Comments
 (0)