Browse Source

updated Device.deviceProfileId openapi description, update AssetProfileInfo.id openapi implementation

pull/15343/head
dashevchenko 6 months ago
parent
commit
430588d991
  1. 2
      common/data/src/main/java/org/thingsboard/server/common/data/Device.java
  2. 7
      common/data/src/main/java/org/thingsboard/server/common/data/asset/AssetProfileInfo.java

2
common/data/src/main/java/org/thingsboard/server/common/data/Device.java

@ -176,7 +176,7 @@ public class Device extends BaseDataWithAdditionalInfo<DeviceId> implements HasL
this.label = label;
}
@Schema(description = "JSON object with Device Profile Id. If not provided, the default device profile will be used.")
@Schema(description = "JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used.")
public DeviceProfileId getDeviceProfileId() {
return deviceProfileId;
}

7
common/data/src/main/java/org/thingsboard/server/common/data/asset/AssetProfileInfo.java

@ -23,6 +23,7 @@ import lombok.ToString;
import lombok.Value;
import org.thingsboard.server.common.data.EntityInfo;
import org.thingsboard.server.common.data.EntityType;
import org.thingsboard.server.common.data.id.AssetProfileId;
import org.thingsboard.server.common.data.id.DashboardId;
import org.thingsboard.server.common.data.id.EntityId;
import org.thingsboard.server.common.data.id.EntityIdFactory;
@ -66,4 +67,10 @@ public class AssetProfileInfo extends EntityInfo {
this(profile.getId(), profile.getTenantId(), profile.getName(), profile.getImage(), profile.getDefaultDashboardId());
}
@Override
@Schema(implementation = AssetProfileId.class, description = "JSON object with the Asset Profile Id.")
public EntityId getId() {
return super.getId();
}
}

Loading…
Cancel
Save