mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-11-30 13:20:40 +03:00
migrate to pydantic 2
This commit is contained in:
@@ -14,8 +14,8 @@ class NonsenseSchema(BaseModel):
|
||||
)
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
schema_extra = {
|
||||
from_attributes = True
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"name": "Name for Some Nonsense",
|
||||
"description": "Some Nonsense Description",
|
||||
@@ -38,8 +38,8 @@ class NonsenseResponse(BaseModel):
|
||||
)
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
schema_extra = {
|
||||
from_attributes = True
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"config_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
||||
"name": "Name for Some Nonsense",
|
||||
|
||||
Reference in New Issue
Block a user