中如何进行数据结构的类型申明
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, Field
class GetRequest...,description="性别") @app.post("/info") async def info(req: GetRequest): print(type(req.age))...import Any, Dict, List, Optional from pydantic import BaseModel, Field app = FastAPI() class GetRequest...,description="性别") async def get_common_query_params(request: Request) -> GetRequest: common_dict...(**common_dict,) return params @app.get("/infos/v1") async def info_v1(req: GetRequest = Depends