diff --git a/samples/anomaly-detection/lib/payload/payload.go b/samples/anomaly-detection/lib/payload/payload.go index eb55b3d..806ce39 100644 --- a/samples/anomaly-detection/lib/payload/payload.go +++ b/samples/anomaly-detection/lib/payload/payload.go @@ -12,14 +12,14 @@ type Payload[T any] struct { } type CommonPayload struct { - AssetID string `json:"asset_id"` - AssetName string `json:"asset_name"` - MaintainenceStatus string `json:"maintainence_status"` + AssetID string `json:"assetId"` + AssetName string `json:"assetName"` + MaintainenceStatus string `json:"maintainenceStatus"` Name string `json:"name"` SerialNumber string `json:"serialNumber"` Site string `json:"site"` - SourceTimestamp string `json:"source_timestamp"` - OperatingTime int `json:"operating_time"` + SourceTimestamp string `json:"sourceTimestamp"` + OperatingTime int `json:"operatingTime"` MachineStatus int `json:"machineStatus"` Humidity float64 `json:"humidity"` Temperature float64 `json:"temperature"` diff --git a/samples/http-grpc-callout/manifest.yml b/samples/http-grpc-callout/manifest.yml index aa52fa6..ad35371 100644 --- a/samples/http-grpc-callout/manifest.yml +++ b/samples/http-grpc-callout/manifest.yml @@ -20,14 +20,76 @@ data: { "hello": "world" } - - path: /example - method: POST + - path: /ref_data + method: GET status: 200 outputs: ["output1"] response: | - { - "hello": "world1" - } + [ + { + "asset_id": "Sea_O1", + "serial_number": "SN001", + "name": "Contoso", + "site": "Seattle", + "maintenance_status": "Done" + }, + { + "asset_id": "Red_O1", + "serial_number": "SN002", + "name": "Contoso", + "site": "Redmond", + "maintenance_status": "Upcoming" + }, + { + "asset_id": "Tac_O1", + "serial_number": "SN003", + "name": "Contoso", + "site": "Tacoma", + "maintenance_status": "Overdue" + }, + { + "asset_id": "Sea_S1", + "serial_number": "SN004", + "name": "Contoso", + "site": "Seattle", + "maintenance_status": "Done" + }, + { + "asset_id": "Red_S1", + "serial_number": "SN005", + "name": "Contoso", + "site": "Redmond", + "maintenance_status": "Done" + }, + { + "asset_id": "Sea_M1", + "serial_number": "SN007", + "name": "Contoso", + "site": "Seattle", + "maintenance_status": "Done" + }, + { + "asset_id": "Red_M1", + "serial_number": "SN008", + "name": "Contoso", + "site": "Redmond", + "maintenance_status": "Overdue" + }, + { + "asset_id": "Tac_M1", + "serial_number": "SN009", + "name": "Contoso", + "site": "Tacoma", + "maintenance_status": "Done" + }, + { + "asset_id": "Tac_S1", + "serial_number": "SN010", + "name": "Contoso", + "site": "Tacoma", + "maintenance_status": "Upcoming" + } + ] - path: /ts method: GET status: 200 @@ -36,28 +98,6 @@ data: { "timestamp": "2023-11-16T8:18:10-08:00" } - - path: /anomaly - method: GET - status: 200 - outputs: ["output1"] - response: | - { - "Payload": { - "assetID": "Tac_S1", - "asset_id": "Tac_S1", - "asset_name": "Tacoma_Slicer_Tacoma_Slicer__asset_0", - "humidity": 82.34915832237789, - "machine_status": 1, - "maintenanceStatus": "Upcoming", - "name": "Contoso", - "operating_time": 5999, - "serialNumber": "SN010", - "site": "Tacoma", - "source_timestamp": "2023-11-02T20:27:09.143Z", - "temperature": 93.56069711661576, - "vibration": 50.98858025013501 - } - } grpc: port: 3334 outputs: ["output1"]