mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2026-01-17 11:40:39 +03:00
add json filed example
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, Json
|
||||
from typing import Any
|
||||
config = ConfigDict(from_attributes=True)
|
||||
|
||||
|
||||
class RandomStuff(BaseModel):
|
||||
chaos: dict[str, Any] = Field(..., description="JSON data for chaos field")
|
||||
|
||||
class StuffSchema(BaseModel):
|
||||
name: str = Field(
|
||||
title="",
|
||||
|
||||
Reference in New Issue
Block a user