更新爆管分析接受参数格式
This commit is contained in:
@@ -103,6 +103,7 @@ def burst_analysis(
|
||||
if isinstance(burst_ID, list):
|
||||
if (burst_size is not None) and (type(burst_size) is not list):
|
||||
return json.dumps("Type mismatch.")
|
||||
# 转化为列表形式
|
||||
elif isinstance(burst_ID, str):
|
||||
burst_ID = [burst_ID]
|
||||
if burst_size is not None:
|
||||
|
||||
@@ -196,10 +196,8 @@ async def burst_analysis_endpoint(
|
||||
async def fastapi_burst_analysis(
|
||||
network: str = Query(...),
|
||||
modify_pattern_start_time: str = Query(...),
|
||||
burst_ID: list | str = Query(..., alias="burst_ID[]"), # 添加别名以匹配 URL
|
||||
burst_size: list | float | int = Query(
|
||||
..., alias="burst_size[]"
|
||||
), # 添加别名以匹配 URL
|
||||
burst_ID: list[str] = Query(...),
|
||||
burst_size: list[float] = Query(...),
|
||||
modify_total_duration: int = Query(...),
|
||||
scheme_name: str = Query(...),
|
||||
) -> str:
|
||||
|
||||
Reference in New Issue
Block a user