feat(shipping-notice): 新增订单行与字段冲突管理功能,支持字段冲突查询与解决
This commit is contained in:
1 parent
4fbaed2b4c
commit
9da0481fc3
74 files changed
+4861
-375
No files matched your search
@@ -17,7 +17,7 @@ def _assert_connector_contract(spec: dict[str, Any]) -> None:
|
||||
"""
|
||||
校验订单行与库存连接器的字段边界。
|
||||
|
||||
核心逻辑:订单行保留可选 source_type 且不暴露 hub_code;任务状态说明使用
|
||||
核心逻辑:订单行保留可选 source_type 与独立 hub_code;任务状态说明使用
|
||||
inventory_connector_type,并拒绝旧 inventory_source_type 命名。
|
||||
|
||||
Args:
|
||||
@@ -30,8 +30,9 @@ def _assert_connector_contract(spec: dict[str, Any]) -> None:
|
||||
"application/json"
|
||||
]["schema"]["properties"]["orders"]["items"]
|
||||
line_properties = order_schema["properties"]["lines"]["items"]["properties"]
|
||||
assert set(line_properties) == {"sku", "qty", "reservation_id", "source_type"}
|
||||
assert set(line_properties) == {"sku", "qty", "reservation_id", "source_type", "hub_code"}
|
||||
assert "可选订单路由线索" in line_properties["source_type"]["description"]
|
||||
assert "Hub" in line_properties["hub_code"]["description"] or "hub" in line_properties["hub_code"]["description"].lower()
|
||||
|
||||
status_description = spec["paths"]["/tools/get_task_status"]["post"]["description"]
|
||||
assert "inventory_connector_type" in status_description
|
||||
|
||||
Reference in new issue
Block a user