Skip to content

Commit 294ec63

Browse files
committed
Update schema_extra to json_schema_extra
1 parent 72699c8 commit 294ec63

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

http_app/routes/api/books.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class CreateBookResponse(BaseModel):
1111
book: Book
1212

1313
class Config:
14-
schema_extra = {
14+
json_schema_extra = {
1515
"example": {
1616
"title": "The Hitchhiker's Guide to the Galaxy",
1717
"author_name": "Douglas Adams",
@@ -25,7 +25,7 @@ class CreateBookRequest(BaseModel):
2525
author_name: str
2626

2727
class Config:
28-
schema_extra = {
28+
json_schema_extra = {
2929
"example": {
3030
"title": "The Hitchhiker's Guide to the Galaxy",
3131
"author_name": "Douglas Adams",

http_app/routes/ping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class PingResponse(BaseModel):
88
ping: str
99

1010
class Config:
11-
schema_extra = {
11+
json_schema_extra = {
1212
"example": {
1313
"ping": "pong!",
1414
}

0 commit comments

Comments
 (0)