更新API请求体,移除不必要的请求参数
This commit is contained in:
@@ -58,7 +58,7 @@ async def fastapi_get_demand_properties(
|
||||
async def fastapi_set_demand_properties(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
junction: str = Query(..., description="节点ID"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""
|
||||
设置节点的需水量属性。
|
||||
@@ -79,7 +79,7 @@ async def fastapi_set_demand_properties(
|
||||
)
|
||||
async def fastapi_calculate_demand_to_nodes(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> dict[str, float]:
|
||||
"""
|
||||
计算需水量到节点分配。
|
||||
@@ -104,7 +104,7 @@ async def fastapi_calculate_demand_to_nodes(
|
||||
)
|
||||
async def fastapi_calculate_demand_to_region(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> dict[str, float]:
|
||||
"""
|
||||
计算需水量到区域分配。
|
||||
|
||||
@@ -326,7 +326,7 @@ async def fast_get_title(network: str = Query(..., description="管网名称(
|
||||
)
|
||||
async def fastapi_set_title(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""设置水网的标题属性。"""
|
||||
props = await req.json()
|
||||
@@ -368,7 +368,7 @@ async def fastapi_get_status(
|
||||
async def fastapi_set_status_properties(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
link: str = Query(..., description="管线ID"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""设置管线的状态属性。"""
|
||||
props = await req.json()
|
||||
|
||||
@@ -341,7 +341,7 @@ async def fastapi_get_all_junction_properties(
|
||||
async def fastapi_set_junction_properties(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
junction: str = Query(..., description="节点 ID"),
|
||||
req: Request = Body(..., description="包含待设置属性的请求体")
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""
|
||||
批量设置节点属性。
|
||||
|
||||
@@ -393,7 +393,7 @@ async def fastapi_get_all_pipe_properties(
|
||||
async def fastapi_set_pipe_properties(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
pipe: str = Query(..., description="管道ID"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""
|
||||
批量设置管道属性。
|
||||
|
||||
@@ -185,7 +185,7 @@ async def fastapi_get_all_pump_properties(
|
||||
async def fastapi_set_pump_properties(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
pump: str = Query(..., description="水泵ID"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""
|
||||
批量设置水泵属性。
|
||||
|
||||
@@ -91,7 +91,7 @@ async def fastapi_get_region(
|
||||
)
|
||||
async def fastapi_set_region(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""设置区域属性。"""
|
||||
props = await req.json()
|
||||
@@ -105,7 +105,7 @@ async def fastapi_set_region(
|
||||
)
|
||||
async def fastapi_add_region(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""添加新的区域。"""
|
||||
props = await req.json()
|
||||
@@ -119,7 +119,7 @@ async def fastapi_add_region(
|
||||
)
|
||||
async def fastapi_delete_region(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""删除区域。"""
|
||||
props = await req.json()
|
||||
@@ -161,7 +161,7 @@ async def fastapi_generate_region(
|
||||
)
|
||||
async def fastapi_calculate_district_metering_area(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> list[list[str]]:
|
||||
"""
|
||||
计算DMA分区。
|
||||
@@ -188,7 +188,7 @@ async def fastapi_calculate_district_metering_area(
|
||||
)
|
||||
async def fastapi_calculate_district_metering_area_for_region(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> list[list[str]]:
|
||||
"""
|
||||
计算区域内DMA分区。
|
||||
@@ -215,7 +215,7 @@ async def fastapi_calculate_district_metering_area_for_region(
|
||||
)
|
||||
async def fastapi_calculate_district_metering_area_for_network(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> list[list[str]]:
|
||||
"""
|
||||
计算整网DMA分区。
|
||||
@@ -262,7 +262,7 @@ async def fastapi_get_district_metering_area(
|
||||
)
|
||||
async def fastapi_set_district_metering_area(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""设置DMA属性。"""
|
||||
props = await req.json()
|
||||
@@ -276,7 +276,7 @@ async def fastapi_set_district_metering_area(
|
||||
)
|
||||
async def fastapi_add_district_metering_area(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""添加新的DMA。"""
|
||||
props = await req.json()
|
||||
@@ -297,7 +297,7 @@ async def fastapi_add_district_metering_area(
|
||||
)
|
||||
async def fastapi_delete_district_metering_area(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""删除DMA。"""
|
||||
props = await req.json()
|
||||
@@ -408,7 +408,7 @@ async def fastapi_get_service_area(
|
||||
)
|
||||
async def fastapi_set_service_area(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""设置服务区属性。"""
|
||||
props = await req.json()
|
||||
@@ -422,7 +422,7 @@ async def fastapi_set_service_area(
|
||||
)
|
||||
async def fastapi_add_service_area(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""添加新的服务区。"""
|
||||
props = await req.json()
|
||||
@@ -436,7 +436,7 @@ async def fastapi_add_service_area(
|
||||
)
|
||||
async def fastapi_delete_service_area(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""删除服务区。"""
|
||||
props = await req.json()
|
||||
@@ -514,7 +514,7 @@ async def fastapi_get_virtual_district(
|
||||
)
|
||||
async def fastapi_set_virtual_district(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""设置虚拟分区属性。"""
|
||||
props = await req.json()
|
||||
@@ -528,7 +528,7 @@ async def fastapi_set_virtual_district(
|
||||
)
|
||||
async def fastapi_add_virtual_district(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""添加新的虚拟分区。"""
|
||||
props = await req.json()
|
||||
@@ -542,7 +542,7 @@ async def fastapi_add_virtual_district(
|
||||
)
|
||||
async def fastapi_delete_virtual_district(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""删除虚拟分区。"""
|
||||
props = await req.json()
|
||||
@@ -568,7 +568,7 @@ async def fastapi_get_all_virtual_district(
|
||||
async def fastapi_generate_virtual_district(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
inflate_delta: float = Query(..., description="膨胀参数"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""生成虚拟分区。"""
|
||||
props = await req.json()
|
||||
@@ -581,7 +581,7 @@ async def fastapi_generate_virtual_district(
|
||||
)
|
||||
async def fastapi_calculate_district_metering_area_for_nodes(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> list[list[str]]:
|
||||
"""
|
||||
计算节点DMA分区。
|
||||
|
||||
@@ -402,7 +402,7 @@ async def fastapi_get_all_reservoir_properties(
|
||||
async def fastapi_set_reservoir_properties(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
reservoir: str = Query(..., description="水库的唯一标识符"),
|
||||
req: Request = Body(..., description="包含要更新的属性的请求体")
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""
|
||||
设置水库的多个属性。
|
||||
|
||||
@@ -59,7 +59,7 @@ async def fastapi_get_tags(
|
||||
)
|
||||
async def fastapi_set_tag(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
req: Request = Body(...)
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""设置标签信息。"""
|
||||
props = await req.json()
|
||||
|
||||
@@ -548,7 +548,7 @@ async def fastapi_get_all_tank_properties(
|
||||
async def fastapi_set_tank_properties(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
tank: str = Query(..., description="水箱ID"),
|
||||
req: Request = Body(..., description="包含要设置的属性的请求体")
|
||||
req: Request = None
|
||||
) -> ChangeSet:
|
||||
"""
|
||||
批量设置水箱的属性。
|
||||
|
||||
@@ -320,7 +320,7 @@ async def fastapi_get_all_valve_properties(
|
||||
async def fastapi_set_valve_properties(
|
||||
network: str = Query(..., description="管网名称(或数据库名称)"),
|
||||
valve: str = Query(..., description="阀门ID"),
|
||||
req: Request = Body(..., description="请求体,包含要更新的属性"),
|
||||
req: Request = None,
|
||||
) -> ChangeSet:
|
||||
"""
|
||||
批量设置阀门的属性。
|
||||
|
||||
Reference in New Issue
Block a user