Showing
9 changed files
with
16 additions
and
31 deletions
@@ -15,11 +15,11 @@ | @@ -15,11 +15,11 @@ | ||
15 | */ | 15 | */ |
16 | package org.thingsboard.server.common.data.device.data; | 16 | package org.thingsboard.server.common.data.device.data; |
17 | 17 | ||
18 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
19 | import com.fasterxml.jackson.annotation.JsonSubTypes; | 20 | import com.fasterxml.jackson.annotation.JsonSubTypes; |
20 | import com.fasterxml.jackson.annotation.JsonTypeInfo; | 21 | import com.fasterxml.jackson.annotation.JsonTypeInfo; |
21 | import io.swagger.annotations.ApiModel; | 22 | import io.swagger.annotations.ApiModel; |
22 | -import io.swagger.annotations.ApiModelProperty; | ||
23 | import org.thingsboard.server.common.data.DeviceProfileType; | 23 | import org.thingsboard.server.common.data.DeviceProfileType; |
24 | 24 | ||
25 | @ApiModel | 25 | @ApiModel |
@@ -32,7 +32,7 @@ import org.thingsboard.server.common.data.DeviceProfileType; | @@ -32,7 +32,7 @@ import org.thingsboard.server.common.data.DeviceProfileType; | ||
32 | @JsonSubTypes.Type(value = DefaultDeviceConfiguration.class, name = "DEFAULT")}) | 32 | @JsonSubTypes.Type(value = DefaultDeviceConfiguration.class, name = "DEFAULT")}) |
33 | public interface DeviceConfiguration { | 33 | public interface DeviceConfiguration { |
34 | 34 | ||
35 | - @ApiModelProperty(position = 1, value = "Device profile type", allowableValues = "DEFAULT") | 35 | + @JsonIgnore |
36 | DeviceProfileType getType(); | 36 | DeviceProfileType getType(); |
37 | 37 | ||
38 | } | 38 | } |
@@ -15,11 +15,11 @@ | @@ -15,11 +15,11 @@ | ||
15 | */ | 15 | */ |
16 | package org.thingsboard.server.common.data.device.data; | 16 | package org.thingsboard.server.common.data.device.data; |
17 | 17 | ||
18 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
19 | import com.fasterxml.jackson.annotation.JsonSubTypes; | 20 | import com.fasterxml.jackson.annotation.JsonSubTypes; |
20 | import com.fasterxml.jackson.annotation.JsonTypeInfo; | 21 | import com.fasterxml.jackson.annotation.JsonTypeInfo; |
21 | import io.swagger.annotations.ApiModel; | 22 | import io.swagger.annotations.ApiModel; |
22 | -import io.swagger.annotations.ApiModelProperty; | ||
23 | import org.thingsboard.server.common.data.DeviceTransportType; | 23 | import org.thingsboard.server.common.data.DeviceTransportType; |
24 | 24 | ||
25 | import java.io.Serializable; | 25 | import java.io.Serializable; |
@@ -37,8 +37,7 @@ import java.io.Serializable; | @@ -37,8 +37,7 @@ import java.io.Serializable; | ||
37 | @JsonSubTypes.Type(value = Lwm2mDeviceTransportConfiguration.class, name = "LWM2M"), | 37 | @JsonSubTypes.Type(value = Lwm2mDeviceTransportConfiguration.class, name = "LWM2M"), |
38 | @JsonSubTypes.Type(value = SnmpDeviceTransportConfiguration.class, name = "SNMP")}) | 38 | @JsonSubTypes.Type(value = SnmpDeviceTransportConfiguration.class, name = "SNMP")}) |
39 | public interface DeviceTransportConfiguration extends Serializable { | 39 | public interface DeviceTransportConfiguration extends Serializable { |
40 | - | ||
41 | - @ApiModelProperty(position = 1, value = "Device transport type", example = "MQTT") | 40 | + @JsonIgnore |
42 | DeviceTransportType getType(); | 41 | DeviceTransportType getType(); |
43 | 42 | ||
44 | default void validate() { | 43 | default void validate() { |
@@ -15,15 +15,13 @@ | @@ -15,15 +15,13 @@ | ||
15 | */ | 15 | */ |
16 | package org.thingsboard.server.common.data.device.profile; | 16 | package org.thingsboard.server.common.data.device.profile; |
17 | 17 | ||
18 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
19 | import com.fasterxml.jackson.annotation.JsonSubTypes; | 20 | import com.fasterxml.jackson.annotation.JsonSubTypes; |
20 | import com.fasterxml.jackson.annotation.JsonTypeInfo; | 21 | import com.fasterxml.jackson.annotation.JsonTypeInfo; |
21 | -import io.swagger.annotations.ApiModel; | ||
22 | -import io.swagger.annotations.ApiModelProperty; | ||
23 | 22 | ||
24 | import java.io.Serializable; | 23 | import java.io.Serializable; |
25 | 24 | ||
26 | -@ApiModel | ||
27 | @JsonIgnoreProperties(ignoreUnknown = true) | 25 | @JsonIgnoreProperties(ignoreUnknown = true) |
28 | @JsonTypeInfo( | 26 | @JsonTypeInfo( |
29 | use = JsonTypeInfo.Id.NAME, | 27 | use = JsonTypeInfo.Id.NAME, |
@@ -35,7 +33,7 @@ import java.io.Serializable; | @@ -35,7 +33,7 @@ import java.io.Serializable; | ||
35 | @JsonSubTypes.Type(value = RepeatingAlarmConditionSpec.class, name = "REPEATING")}) | 33 | @JsonSubTypes.Type(value = RepeatingAlarmConditionSpec.class, name = "REPEATING")}) |
36 | public interface AlarmConditionSpec extends Serializable { | 34 | public interface AlarmConditionSpec extends Serializable { |
37 | 35 | ||
38 | - @ApiModelProperty(position = 1, value = "String value representing alarm condition type. See method implementation notes for more examples") | 36 | + @JsonIgnore |
39 | AlarmConditionSpecType getType(); | 37 | AlarmConditionSpecType getType(); |
40 | 38 | ||
41 | } | 39 | } |
@@ -18,12 +18,9 @@ package org.thingsboard.server.common.data.device.profile; | @@ -18,12 +18,9 @@ package org.thingsboard.server.common.data.device.profile; | ||
18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
19 | import com.fasterxml.jackson.annotation.JsonSubTypes; | 19 | import com.fasterxml.jackson.annotation.JsonSubTypes; |
20 | import com.fasterxml.jackson.annotation.JsonTypeInfo; | 20 | import com.fasterxml.jackson.annotation.JsonTypeInfo; |
21 | -import io.swagger.annotations.ApiModel; | ||
22 | -import io.swagger.annotations.ApiModelProperty; | ||
23 | 21 | ||
24 | import java.io.Serializable; | 22 | import java.io.Serializable; |
25 | 23 | ||
26 | -@ApiModel | ||
27 | @JsonIgnoreProperties(ignoreUnknown = true) | 24 | @JsonIgnoreProperties(ignoreUnknown = true) |
28 | @JsonTypeInfo( | 25 | @JsonTypeInfo( |
29 | use = JsonTypeInfo.Id.NAME, | 26 | use = JsonTypeInfo.Id.NAME, |
@@ -35,7 +32,6 @@ import java.io.Serializable; | @@ -35,7 +32,6 @@ import java.io.Serializable; | ||
35 | @JsonSubTypes.Type(value = CustomTimeSchedule.class, name = "CUSTOM")}) | 32 | @JsonSubTypes.Type(value = CustomTimeSchedule.class, name = "CUSTOM")}) |
36 | public interface AlarmSchedule extends Serializable { | 33 | public interface AlarmSchedule extends Serializable { |
37 | 34 | ||
38 | - @ApiModelProperty(position = 1, value = "Alarm schedule type. See method implementation notes for more examples", example = "ANY_TIME") | ||
39 | AlarmScheduleType getType(); | 35 | AlarmScheduleType getType(); |
40 | 36 | ||
41 | } | 37 | } |
@@ -21,8 +21,8 @@ import lombok.Data; | @@ -21,8 +21,8 @@ import lombok.Data; | ||
21 | import org.thingsboard.server.common.data.alarm.AlarmSeverity; | 21 | import org.thingsboard.server.common.data.alarm.AlarmSeverity; |
22 | import org.thingsboard.server.common.data.validation.NoXss; | 22 | import org.thingsboard.server.common.data.validation.NoXss; |
23 | 23 | ||
24 | -import java.io.Serializable; | ||
25 | import javax.validation.Valid; | 24 | import javax.validation.Valid; |
25 | +import java.io.Serializable; | ||
26 | import java.util.List; | 26 | import java.util.List; |
27 | import java.util.TreeMap; | 27 | import java.util.TreeMap; |
28 | 28 | ||
@@ -33,7 +33,7 @@ public class DeviceProfileAlarm implements Serializable { | @@ -33,7 +33,7 @@ public class DeviceProfileAlarm implements Serializable { | ||
33 | @ApiModelProperty(position = 1, value = "String value representing the alarm rule id", example = "highTemperatureAlarmID") | 33 | @ApiModelProperty(position = 1, value = "String value representing the alarm rule id", example = "highTemperatureAlarmID") |
34 | private String id; | 34 | private String id; |
35 | @NoXss | 35 | @NoXss |
36 | - @ApiModelProperty(position = 2, value = "String value representing type of the Alarm", example = "High Temperature Alarm") | 36 | + @ApiModelProperty(position = 2, value = "String value representing type of the alarm", example = "High Temperature Alarm") |
37 | private String alarmType; | 37 | private String alarmType; |
38 | 38 | ||
39 | @Valid | 39 | @Valid |
@@ -15,26 +15,24 @@ | @@ -15,26 +15,24 @@ | ||
15 | */ | 15 | */ |
16 | package org.thingsboard.server.common.data.device.profile; | 16 | package org.thingsboard.server.common.data.device.profile; |
17 | 17 | ||
18 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
19 | import com.fasterxml.jackson.annotation.JsonSubTypes; | 20 | import com.fasterxml.jackson.annotation.JsonSubTypes; |
20 | import com.fasterxml.jackson.annotation.JsonTypeInfo; | 21 | import com.fasterxml.jackson.annotation.JsonTypeInfo; |
21 | -import io.swagger.annotations.ApiModel; | ||
22 | -import io.swagger.annotations.ApiModelProperty; | ||
23 | import org.thingsboard.server.common.data.DeviceProfileType; | 22 | import org.thingsboard.server.common.data.DeviceProfileType; |
24 | 23 | ||
25 | import java.io.Serializable; | 24 | import java.io.Serializable; |
26 | 25 | ||
27 | -@ApiModel | ||
28 | @JsonIgnoreProperties(ignoreUnknown = true) | 26 | @JsonIgnoreProperties(ignoreUnknown = true) |
29 | @JsonTypeInfo( | 27 | @JsonTypeInfo( |
30 | use = JsonTypeInfo.Id.NAME, | 28 | use = JsonTypeInfo.Id.NAME, |
31 | include = JsonTypeInfo.As.PROPERTY, | 29 | include = JsonTypeInfo.As.PROPERTY, |
32 | property = "type") | 30 | property = "type") |
33 | @JsonSubTypes({ | 31 | @JsonSubTypes({ |
34 | - @JsonSubTypes.Type(value = DefaultDeviceProfileConfiguration.class, name = "DEFAULT")}) | 32 | + @JsonSubTypes.Type(value = DefaultDeviceProfileConfiguration.class, name = "DEFAULT")}) |
35 | public interface DeviceProfileConfiguration extends Serializable { | 33 | public interface DeviceProfileConfiguration extends Serializable { |
36 | 34 | ||
37 | - @ApiModelProperty(position = 1, value = "Device profile type", allowableValues = "DEFAULT") | 35 | + @JsonIgnore |
38 | DeviceProfileType getType(); | 36 | DeviceProfileType getType(); |
39 | 37 | ||
40 | } | 38 | } |
@@ -19,15 +19,15 @@ import io.swagger.annotations.ApiModel; | @@ -19,15 +19,15 @@ import io.swagger.annotations.ApiModel; | ||
19 | import io.swagger.annotations.ApiModelProperty; | 19 | import io.swagger.annotations.ApiModelProperty; |
20 | import lombok.Data; | 20 | import lombok.Data; |
21 | 21 | ||
22 | -import java.io.Serializable; | ||
23 | import javax.validation.Valid; | 22 | import javax.validation.Valid; |
23 | +import java.io.Serializable; | ||
24 | import java.util.List; | 24 | import java.util.List; |
25 | 25 | ||
26 | @ApiModel | 26 | @ApiModel |
27 | @Data | 27 | @Data |
28 | public class DeviceProfileData implements Serializable { | 28 | public class DeviceProfileData implements Serializable { |
29 | 29 | ||
30 | - @ApiModelProperty(position = 1, value = "JSON object of device profile configuration for device profile type") | 30 | + @ApiModelProperty(position = 1, value = "JSON object of device profile configuration") |
31 | private DeviceProfileConfiguration configuration; | 31 | private DeviceProfileConfiguration configuration; |
32 | @Valid | 32 | @Valid |
33 | @ApiModelProperty(position = 2, value = "JSON object of device profile transport configuration") | 33 | @ApiModelProperty(position = 2, value = "JSON object of device profile transport configuration") |
@@ -19,13 +19,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore; | @@ -19,13 +19,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore; | ||
19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
20 | import com.fasterxml.jackson.annotation.JsonSubTypes; | 20 | import com.fasterxml.jackson.annotation.JsonSubTypes; |
21 | import com.fasterxml.jackson.annotation.JsonTypeInfo; | 21 | import com.fasterxml.jackson.annotation.JsonTypeInfo; |
22 | -import io.swagger.annotations.ApiModel; | ||
23 | -import io.swagger.annotations.ApiModelProperty; | ||
24 | import org.thingsboard.server.common.data.DeviceProfileProvisionType; | 22 | import org.thingsboard.server.common.data.DeviceProfileProvisionType; |
25 | 23 | ||
26 | import java.io.Serializable; | 24 | import java.io.Serializable; |
27 | 25 | ||
28 | -@ApiModel | ||
29 | @JsonIgnoreProperties(ignoreUnknown = true) | 26 | @JsonIgnoreProperties(ignoreUnknown = true) |
30 | @JsonTypeInfo( | 27 | @JsonTypeInfo( |
31 | use = JsonTypeInfo.Id.NAME, | 28 | use = JsonTypeInfo.Id.NAME, |
@@ -37,10 +34,9 @@ import java.io.Serializable; | @@ -37,10 +34,9 @@ import java.io.Serializable; | ||
37 | @JsonSubTypes.Type(value = CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration.class, name = "CHECK_PRE_PROVISIONED_DEVICES")}) | 34 | @JsonSubTypes.Type(value = CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration.class, name = "CHECK_PRE_PROVISIONED_DEVICES")}) |
38 | public interface DeviceProfileProvisionConfiguration extends Serializable { | 35 | public interface DeviceProfileProvisionConfiguration extends Serializable { |
39 | 36 | ||
40 | - @ApiModelProperty(position = 1, value = "String value representing the secret key used to verify provisioning of the device defined in the device profile", example = "bjrj9172va82hvwqtp5b") | ||
41 | String getProvisionDeviceSecret(); | 37 | String getProvisionDeviceSecret(); |
42 | 38 | ||
43 | - @ApiModelProperty(position = 2, value = "Device provisioning strategy for device profile", example = "ALLOW_CREATE_NEW_DEVICES") | 39 | + @JsonIgnore |
44 | DeviceProfileProvisionType getType(); | 40 | DeviceProfileProvisionType getType(); |
45 | 41 | ||
46 | } | 42 | } |
@@ -15,14 +15,12 @@ | @@ -15,14 +15,12 @@ | ||
15 | */ | 15 | */ |
16 | package org.thingsboard.server.common.data.query; | 16 | package org.thingsboard.server.common.data.query; |
17 | 17 | ||
18 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
18 | import com.fasterxml.jackson.annotation.JsonSubTypes; | 19 | import com.fasterxml.jackson.annotation.JsonSubTypes; |
19 | import com.fasterxml.jackson.annotation.JsonTypeInfo; | 20 | import com.fasterxml.jackson.annotation.JsonTypeInfo; |
20 | -import io.swagger.annotations.ApiModel; | ||
21 | -import io.swagger.annotations.ApiModelProperty; | ||
22 | 21 | ||
23 | import java.io.Serializable; | 22 | import java.io.Serializable; |
24 | 23 | ||
25 | -@ApiModel | ||
26 | @JsonTypeInfo( | 24 | @JsonTypeInfo( |
27 | use = JsonTypeInfo.Id.NAME, | 25 | use = JsonTypeInfo.Id.NAME, |
28 | include = JsonTypeInfo.As.PROPERTY, | 26 | include = JsonTypeInfo.As.PROPERTY, |
@@ -34,7 +32,7 @@ import java.io.Serializable; | @@ -34,7 +32,7 @@ import java.io.Serializable; | ||
34 | @JsonSubTypes.Type(value = ComplexFilterPredicate.class, name = "COMPLEX")}) | 32 | @JsonSubTypes.Type(value = ComplexFilterPredicate.class, name = "COMPLEX")}) |
35 | public interface KeyFilterPredicate extends Serializable { | 33 | public interface KeyFilterPredicate extends Serializable { |
36 | 34 | ||
37 | - @ApiModelProperty(position = 1, value = "String value representing filter predicate type. See method implementation notes for more examples", example = "BOOLEAN") | 35 | + @JsonIgnore |
38 | FilterPredicateType getType(); | 36 | FilterPredicateType getType(); |
39 | 37 | ||
40 | } | 38 | } |