上一篇记录了FastAPI中声明请求体的相关内容,本文记录一下零碎的函数特性和参数特性相关内容。...citys":["绵阳","成都","遂宁","..."],
"population":66666666
}
}
Field参数设置...field同Path、Query、Body可以设置default、title等信息;具体参看源码;
def Field(
default: Any = Undefined,
*,...regex: str = None,
discriminator: str = None,
repr: bool = True,
**extra: Any,
)
Body参数设置