migrate to pydantic 2

This commit is contained in:
Jakub Miazek
2023-07-07 20:32:41 +02:00
parent d07fb04553
commit d05f2cdb2e
8 changed files with 17 additions and 23 deletions

View File

@@ -14,8 +14,8 @@ class StuffSchema(BaseModel):
)
class Config:
orm_mode = True
schema_extra = {
from_attributes = True
json_schema_extra = {
"example": {
"name": "Name for Some Stuff",
"description": "Some Stuff Description",
@@ -38,8 +38,8 @@ class StuffResponse(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 Stuff",