modify: 清理孤儿模型 AlarmReportPostResponse(契约校验对齐)
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from .pydantic import AiboxSophonAdapterResponse
|
from .pydantic import AiboxSophonAdapterResponse
|
||||||
from .pydantic import AlarmReportPostResponse
|
|
||||||
from .pydantic import GetAlarmGetRequest
|
from .pydantic import GetAlarmGetRequest
|
||||||
from .pydantic import GetAlarmGetResponse
|
from .pydantic import GetAlarmGetResponse
|
||||||
from .pydantic import GetDeviceGetRequest
|
from .pydantic import GetDeviceGetRequest
|
||||||
@@ -16,7 +15,6 @@ from .pydantic import ListDevicesGetResponse
|
|||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"AiboxSophonAdapterResponse",
|
"AiboxSophonAdapterResponse",
|
||||||
"AlarmReportPostResponse",
|
|
||||||
"GetAlarmGetRequest",
|
"GetAlarmGetRequest",
|
||||||
"GetAlarmGetResponse",
|
"GetAlarmGetResponse",
|
||||||
"GetDeviceGetRequest",
|
"GetDeviceGetRequest",
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ from __future__ import annotations
|
|||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
class AlarmReportPostResponse(BaseModel):
|
|
||||||
"""告警上报接口 — 响应体"""
|
|
||||||
Result: dict[str, Any] = Field(...)
|
|
||||||
|
|
||||||
class GetAlarmGetRequest(BaseModel):
|
class GetAlarmGetRequest(BaseModel):
|
||||||
"""查询单条告警详情 — 请求体"""
|
"""查询单条告警详情 — 请求体"""
|
||||||
alarm_id: str = Field(...)
|
alarm_id: str = Field(...)
|
||||||
@@ -67,4 +63,4 @@ class ListDevicesGetResponse(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
# 所有响应模型的联合类型
|
# 所有响应模型的联合类型
|
||||||
AiboxSophonAdapterResponse = GetOfflineDevicesGetResponse | AlarmReportPostResponse | GetAlarmGetResponse | GetDeviceGetResponse | ListAlarmsGetResponse | ListDevicesGetResponse
|
AiboxSophonAdapterResponse = ListDevicesGetResponse | ListAlarmsGetResponse | GetAlarmGetResponse | GetOfflineDevicesGetResponse | GetDeviceGetResponse
|
||||||
|
|||||||
Reference in New Issue
Block a user