zap*_*ger 24 python-3.x pydantic fastapi
我用一些参数做了一个帖子,但其中一个返回“field required”和“value_error.missing”,但该字段在那里并且有一个值。查看 Postman 的输出。

在 schemas.py 中,字段定义如下:
class Message(BaseModel):
title: str
id: int
datim: Optional[datetime]
to_id: Optional[int]
from_id: Optional[int]
body: Optional[str]
class Config:
orm_mode = True
Run Code Online (Sandbox Code Playgroud)
那么它为什么要抱怨“身体”呢?
| 归档时间: |
|
| 查看次数: |
47409 次 |
| 最近记录: |