From 8990477f91b8d848333a701944823b424595d41d Mon Sep 17 00:00:00 2001 From: Andrii Shvaika Date: Thu, 2 Apr 2026 08:59:40 +0300 Subject: [PATCH] fix(iot-hub): add type discriminator to device register request body Jackson requires the 'type' field for @JsonTypeInfo polymorphic deserialization of DeviceInstalledItemDescriptor. --- ui-ngx/src/app/core/http/iot-hub-api.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/core/http/iot-hub-api.service.ts b/ui-ngx/src/app/core/http/iot-hub-api.service.ts index ef1fce640e..c6ecd701cd 100644 --- a/ui-ngx/src/app/core/http/iot-hub-api.service.ts +++ b/ui-ngx/src/app/core/http/iot-hub-api.service.ts @@ -114,12 +114,12 @@ export class IotHubApiService { public registerDeviceInstall( versionId: string, - descriptor: { createdEntityIds: { entityType: string; id: string }[]; dashboardId?: { id: string } }, + descriptor: { type?: string; createdEntityIds: { entityType: string; id: string }[]; dashboardId?: { id: string } }, config?: IotHubRequestConfig ): Observable { return this.http.post( `/api/iot-hub/device/register?versionId=${versionId}`, - descriptor, + { type: 'DEVICE', ...descriptor }, { params: this.buildParams(config) } ); }