Pydantic 参数校验 批量提交 批量校验
Standard Library Types - Pydantic https://docs.pydantic.dev/2.7/api/standard_library_types/#typeddict
from pydantic import BaseModel
from typing import List
from typing_extensions import TypedDict
# `total=False` means keys are non-required
class Identity(TypedDict, total=True):
name: str
id: int
class Batch(BaseModel):
batch: List[Identity]