fastapi接口参数限制

路徑的例子

Path(title="The ID of the item to get")

查詢參數

Query(
    title="Query string",
    description="Query string for the items to search in the database that have a good match",
    min_length=3,
)

body的字段

Field(
    default=None, title="The description of the item", max_length=300
)
posted @ 2023-10-21 11:43  bitterteaer  阅读(63)  评论(0编辑  收藏  举报