Browse Source

Remove @Length validation for image fields

pull/9819/head
ViacheslavKlimov 3 years ago
parent
commit
0ae62e7a57
  1. 1
      common/data/src/main/java/org/thingsboard/server/common/data/DashboardInfo.java
  2. 1
      common/data/src/main/java/org/thingsboard/server/common/data/DeviceProfile.java
  3. 1
      common/data/src/main/java/org/thingsboard/server/common/data/asset/AssetProfile.java
  4. 1
      common/data/src/main/java/org/thingsboard/server/common/data/widget/WidgetTypeDetails.java
  5. 2
      common/data/src/main/java/org/thingsboard/server/common/data/widget/WidgetsBundle.java

1
common/data/src/main/java/org/thingsboard/server/common/data/DashboardInfo.java

@ -38,7 +38,6 @@ public class DashboardInfo extends BaseData<DashboardId> implements HasName, Has
@NoXss
@Length(fieldName = "title")
private String title;
@Length(fieldName = "image", max = 1000000)
private String image;
@Valid
private Set<ShortCustomerInfo> assignedCustomers;

1
common/data/src/main/java/org/thingsboard/server/common/data/DeviceProfile.java

@ -54,7 +54,6 @@ public class DeviceProfile extends BaseData<DeviceProfileId> implements HasName,
@NoXss
@ApiModelProperty(position = 11, value = "Device Profile description. ")
private String description;
@Length(fieldName = "image", max = 1000000)
@ApiModelProperty(position = 12, value = "Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. ")
private String image;
private boolean isDefault;

1
common/data/src/main/java/org/thingsboard/server/common/data/asset/AssetProfile.java

@ -52,7 +52,6 @@ public class AssetProfile extends BaseData<AssetProfileId> implements HasName, H
@NoXss
@ApiModelProperty(position = 11, value = "Asset Profile description. ")
private String description;
@Length(fieldName = "image", max = 1000000)
@ApiModelProperty(position = 12, value = "Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. ")
private String image;
private boolean isDefault;

1
common/data/src/main/java/org/thingsboard/server/common/data/widget/WidgetTypeDetails.java

@ -32,7 +32,6 @@ import org.thingsboard.server.common.data.validation.NoXss;
@JsonPropertyOrder({ "fqn", "name", "deprecated", "image", "description", "descriptor", "externalId" })
public class WidgetTypeDetails extends WidgetType implements HasName, HasTenantId, HasImage, ExportableEntity<WidgetTypeId> {
@Length(fieldName = "image", max = 1000000)
@ApiModelProperty(position = 9, value = "Relative or external image URL. Replaced with image data URL (Base64) in case of relative URL and 'inlineImages' option enabled.")
private String image;
@NoXss

2
common/data/src/main/java/org/thingsboard/server/common/data/widget/WidgetsBundle.java

@ -57,7 +57,6 @@ public class WidgetsBundle extends BaseData<WidgetsBundleId> implements HasName,
@ApiModelProperty(position = 5, value = "Title used in search and UI", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
private String title;
@Length(fieldName = "image", max = 1000000)
@Getter
@Setter
@ApiModelProperty(position = 6, value = "Relative or external image URL. Replaced with image data URL (Base64) in case of relative URL and 'inlineImages' option enabled.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
@ -66,7 +65,6 @@ public class WidgetsBundle extends BaseData<WidgetsBundleId> implements HasName,
@NoXss
@Length(fieldName = "description", max = 1024)
@Getter
@Setter
@ApiModelProperty(position = 7, value = "Description", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
private String description;

Loading…
Cancel
Save