Commit 2e187df4485ee160edca284df3e82dd5577c5b7d
Merge branch 'feature/swagger-alarm-controller' of https://github.com/ShvaykaD/t…
…hingsboard into feature/swagger
Showing
4 changed files
with
7 additions
and
2 deletions
... | ... | @@ -221,7 +221,7 @@ public class AlarmController extends BaseController { |
221 | 221 | @RequestParam int page, |
222 | 222 | @ApiParam(value = ALARM_QUERY_TEXT_SEARCH_DESCRIPTION) |
223 | 223 | @RequestParam(required = false) String textSearch, |
224 | - @ApiParam(value = SORT_PROPERTY_DESCRIPTION, allowableValues = SORT_PROPERTY_ALLOWABLE_VALUES) | |
224 | + @ApiParam(value = SORT_PROPERTY_DESCRIPTION, allowableValues = ALARM_SORT_PROPERTY_ALLOWABLE_VALUES) | |
225 | 225 | @RequestParam(required = false) String sortProperty, |
226 | 226 | @ApiParam(value = SORT_ORDER_DESCRIPTION, allowableValues = SORT_ORDER_ALLOWABLE_VALUES) |
227 | 227 | @RequestParam(required = false) String sortOrder, |
... | ... | @@ -270,7 +270,7 @@ public class AlarmController extends BaseController { |
270 | 270 | @RequestParam int page, |
271 | 271 | @ApiParam(value = ALARM_QUERY_TEXT_SEARCH_DESCRIPTION) |
272 | 272 | @RequestParam(required = false) String textSearch, |
273 | - @ApiParam(value = SORT_PROPERTY_DESCRIPTION, allowableValues = SORT_PROPERTY_ALLOWABLE_VALUES) | |
273 | + @ApiParam(value = SORT_PROPERTY_DESCRIPTION, allowableValues = ALARM_SORT_PROPERTY_ALLOWABLE_VALUES) | |
274 | 274 | @RequestParam(required = false) String sortProperty, |
275 | 275 | @ApiParam(value = SORT_ORDER_DESCRIPTION, allowableValues = SORT_ORDER_ALLOWABLE_VALUES) |
276 | 276 | @RequestParam(required = false) String sortOrder, | ... | ... |
... | ... | @@ -184,6 +184,7 @@ public abstract class BaseController { |
184 | 184 | protected final String CUSTOMER_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, title, email, country, city"; |
185 | 185 | protected final String DEVICE_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, name, deviceProfileName, label, customerTitle"; |
186 | 186 | protected final String ASSET_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, name, type, label, customerTitle"; |
187 | + protected final String ALARM_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, startTs, endTs, type, ackTs, clearTs, severity, status"; | |
187 | 188 | protected final String SORT_ORDER_DESCRIPTION = "Sort order. ASC (ASCENDING) or DESC (DESCENDING)"; |
188 | 189 | protected final String SORT_ORDER_ALLOWABLE_VALUES = "ASC, DESC"; |
189 | 190 | protected final String DEVICE_INFO_DESCRIPTION = "Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. "; | ... | ... |
... | ... | @@ -17,6 +17,7 @@ package org.thingsboard.server.common.data.alarm; |
17 | 17 | |
18 | 18 | import com.fasterxml.jackson.annotation.JsonProperty; |
19 | 19 | import com.fasterxml.jackson.databind.JsonNode; |
20 | +import io.swagger.annotations.ApiModel; | |
20 | 21 | import io.swagger.annotations.ApiModelProperty; |
21 | 22 | import lombok.AllArgsConstructor; |
22 | 23 | import lombok.Builder; |
... | ... | @@ -35,6 +36,7 @@ import java.util.List; |
35 | 36 | /** |
36 | 37 | * Created by ashvayka on 11.05.17. |
37 | 38 | */ |
39 | +@ApiModel | |
38 | 40 | @Data |
39 | 41 | @Builder |
40 | 42 | @AllArgsConstructor | ... | ... |
... | ... | @@ -15,8 +15,10 @@ |
15 | 15 | */ |
16 | 16 | package org.thingsboard.server.common.data.alarm; |
17 | 17 | |
18 | +import io.swagger.annotations.ApiModel; | |
18 | 19 | import io.swagger.annotations.ApiModelProperty; |
19 | 20 | |
21 | +@ApiModel | |
20 | 22 | public class AlarmInfo extends Alarm { |
21 | 23 | |
22 | 24 | private static final long serialVersionUID = 2807343093519543363L; | ... | ... |