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